]> git.ipfire.org Git - thirdparty/coreutils.git/commitdiff
doc: clarify numeric setuid handling in chmod man page
authorPádraig Brady <P@draigBrady.com>
Sun, 10 Dec 2017 02:26:56 +0000 (18:26 -0800)
committerPádraig Brady <P@draigBrady.com>
Sun, 10 Dec 2017 02:26:56 +0000 (18:26 -0800)
* man/chmod.x: Update the information to state one can
clear the setuid and setgid bits for directories numerically
using an additional leading '0' or a leading '='.
That has been supported since v8.15-64-g8931cdb.
Fixes https://bugs.gnu.org/29390

man/chmod.x

index ff013a3a1818c21e380f6e74a64f4989fde24787..cf31ea760d7d74d1f4dcf018302fee403bc0800c 100644 (file)
@@ -87,14 +87,19 @@ functionality of the underlying
 system call.  When in
 doubt, check the underlying system behavior.
 .PP
+For directories
 .B chmod
-preserves a directory's set-user-ID and set-group-ID bits unless you
+preserves set-user-ID and set-group-ID bits unless you
 explicitly specify otherwise.  You can set or clear the bits with
 symbolic modes like
 .B u+s
 and
-.BR g\-s ,
-and you can set (but not clear) the bits with a numeric mode.
+.BR g\-s .
+To clear these bits for directories with a numeric mode requires
+an additional leading zero, or leading = like
+.B 00755
+, or
+.B =755
 .SH "RESTRICTED DELETION FLAG OR STICKY BIT"
 The restricted deletion flag or sticky bit is a single bit, whose
 interpretation depends on the file type.  For directories, it prevents