[Haskell-cafe] setPermissions bug?
simonmar at microsoft.com
Wed Feb 18 12:31:34 EST 2004
> 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
> 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
More information about the Haskell-Cafe