[Haskell-cafe] setPermissions bug?
Simon Marlow
simonmar at microsoft.com
Fri Feb 20 16:44:26 EST 2004
> On Wed, Feb 18, 2004 at 12:31:34PM -0000, Simon Marlow wrote:
> > > 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.).
>
> Well, in my case all I want to do is to copy permissions from
> one file to
> another, so get/setPermissions would have been fine. But yeah, I've
> already switched to using setFileMode etc.
Actually if you want to copy permissions from one file to another, then
get/setPermissions is *not* what you want. It will only copy across the
owner's permissions. The problem is that the Permissions type is fully
defined and non-abstract; there's no place to store extra
platform-specific permission bits.
Cheers,
Simon
More information about the Haskell-Cafe
mailing list