
18 Feb
2004
18 Feb
'04
12:31 p.m.
I've run into a problem using Directory.setPermissions (or equivalently System.Directory.setPermissions).
Basically the problem is that
getPermissions f >>= setPermissions f
is not a noop. Instead it is equivalent to
chmod o-r f chmod g-r f etc
I presume that this is a bug in setPermissions?
Yes, it's a bug. However, since getPermissions/setPermissions doesn't really give you enough control in Unix, I suggest you use the functions available from System.Posix instead (fileStatus, fileMode, setFileMode etc.). Cheers, Simon