bug-coreutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: chmod octal form of sgid/suid removal fails


From: Paul Eggert
Subject: Re: chmod octal form of sgid/suid removal fails
Date: Tue, 15 May 2007 05:54:12 -0700
User-agent: Gnus/5.110006 (No Gnus v0.6) Emacs/21.4 (gnu/linux)

John Cowan <address@hidden> writes:

> However, if the directory has mode 6755 and you
> do "chmod 2755 dir", the mode remains 6755.

I hadn't thought of that example.  It's a good illustration of an
unfortunate corner in the current rules.  But I can't think of a
simple change to the rules that wouldn't introduce some of the other
corners we've been talking about.

One way to think about it is that the current rules are biased in
favor of setting the setuid and setgid bits on directories, since you
have to clear them with symbolic modes and cannot clear them with
numeric.  This can be thought of as a design policy: coreutils prefers
sharing (sort of a corollary of the overall GNU philosophy).  But it's
a weak reed I admit.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]