Subject: Re: chmod(1) and '+X'
To: None <tech-userlevel@netbsd.org>
From: Jan Schaumann <jschauma@netbsd.org>
List: tech-userlevel
Date: 01/17/2004 13:45:47
--at6+YcpfzWZg/htY
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

"Perry E. Metzger" <perry@piermont.com> wrote:

> Certainly adding the bit is wrong in the - case.
>=20
> However, what it *should* do is also unclear. What do other chmod's
> do? the -X thing seems ambiguous with respect to files at least.

IRIX' chmod and GNU chmod remove the 'x' bit.

> I don't know why you would want to REMOVE the bit differently from
> dirs and files, though -- it seems like the semantics are less than
> obvious.

True enough.  I had just noticed that adding the bit is wrong.  I'd say
that 'X' should work with '-' as it should with '+':  that is, perform
the operation (+/-) on all files/dirs that have the 'x' bit set.

-Jan

--=20
This one's tricky. You have to use imaginary numbers, like eleventeen...

--at6+YcpfzWZg/htY
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.3 (NetBSD)

iD8DBQFACYLbfFtkr68iakwRArf5AJ9iMcQdfE441KI/C8wEX9J5H1LS9QCfb9LZ
qCMc+OT3m2/H+P0epNq4zgY=
=uxiF
-----END PGP SIGNATURE-----

--at6+YcpfzWZg/htY--