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: John Cowan
Subject: Re: chmod octal form of sgid/suid removal fails
Date: Sat, 12 May 2007 15:39:48 -0400
User-agent: Mutt/1.5.13 (2006-08-11)

Eric Blake scripsit:

>   chmod, install, and mkdir now preserve a directory's set-user-ID and
>   set-group-ID bits unless you explicitly request otherwise.  

Well and good, but it seems to me that writing an explicit 0 actually
does make an explicit request.

>   To clear the bits, mention them explicitly in a symbolic mode, e.g.,
>   `mkdir -m u=rwx,go=rx,-s DIR'.  To set them, mention them explicitly
>   in either a symbolic or a numeric mode, e.g., `mkdir -m 2755 DIR',
>   `mkdir -m u=rwx,go=rx,g+s' DIR.

No explanation is given for this asymmetric behavior.  It seems to me
that a fourth digit, if given, should be believed rather than treated
as an OR mask.

-- 
John Cowan                              <address@hidden>
            http://www.ccil.org/~cowan
                .e'osai ko sarji la lojban.
                Please support Lojban!          http://www.lojban.org




reply via email to

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