Subject: Re: chmod weirdness (was: Re: CVS commit: pkgsrc/lang/jasmin)
To: None <pkgsrc-changes@NetBSD.org>
From: Joerg Sonnenberger <joerg@britannica.bec.de>
List: pkgsrc-changes
Date: 12/01/2007 17:29:53
On Sat, Dec 01, 2007 at 04:49:39PM +0100, Roland Illig wrote:
> What did you intend with the mode "=urwXgrXorX"? When I interpret it 
> correctly, it says:
> - set all of the permission bits (the "who" field is empty)

That's where I got confused.

> - to those of the owner,
> - then set "rwX",
> - then set them to the same as the group,
> - then to "rX",
> - then to those of the others,
> - then to "rX".

This is the part where I don't agree :-)

>
> Since all these operations are overwriting ones, you end up with the same 
> as "a=rX". I just tried to understand the setmode/getmode code: It's really 
> complicated.

It seems like NetBSD's chmod ignores the mask as it is invalid (u is not
a valid mode) and the DragonFly one I tried with ignored the invalid
letters and ended up using =rX pr something like that. Weired.

Joerg