Subject: Re: chmod weirdness (was: Re: CVS commit: pkgsrc/lang/jasmin)
To: None <pkgsrc-changes@NetBSD.org>
From: Alan Barrett <apb@cequrux.com>
List: pkgsrc-changes
Date: 12/02/2007 13:40:28
On Sat, 01 Dec 2007, Roland Illig wrote:
> What did you intend with the mode "=urwXgrXorX"?

They probably intended to say "u=rwX,g=rX,o=rX".

> When I interpret it correctly, it says:
> - set all of the permission bits (the "who" field is empty)
> - 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".

I agree with you that "=urwXgrXorX" should mean the same as
"a=u,a+rwX,a+g,a+rX,a+o,a+rX", according to tke NetBSD chmod(1) man
page.  But the SUSv3 spec seems to define "operation" in a different
way: By my reading, "u=rwX" is one clause containing three operations
(to be performed in order) according to the NetBSD man page, or one
clause and one operation (to be performed all at once) according to the
SUSv3 spec.  It's not clear to me that the meaning of "=urwXgrXorX" is
well defined under the SUSv3 interpretation.

--apb (Alan Barrett)