Subject: Re: chmod(1) and '+X'
To: None <email@example.com>
From: Perry E. Metzger <firstname.lastname@example.org>
Date: 01/17/2004 13:34:22
Jan Schaumann <email@example.com> writes:
> "Perry E. Metzger" <firstname.lastname@example.org> wrote:
>> So far as I know, our chmod ALREADY behaves correctly.
> So the behaviour I reported in
> http://mail-index.netbsd.org/tech-userlevel/2003/12/13/0008.html is
> correct? It seems to me that 'chmod o-X' should remove the executable
> bit from all directories or files that have it set. Instead, atm, it
> _sets_ the executable bit, as if 'chmd o+X' had been issued.
Didn't know about that. What I meant was that chmod o=rX works just
fine -- + isn't the only thing that works right.
Certainly adding the bit is wrong in the - case.
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.
I suppose that no one really contemplated the -X case -- its a fairly
weird thing to want. The big plus of X is for things like
chmod -R u=rwX,go=rX /usr/src
where you want it to be setting dirs and files differently. 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.