From: Bernhard Voelker Date: Sat, 16 Dec 2017 22:07:27 +0000 (+0100) Subject: doc: mention which privileges are needed to chmod X-Git-Tag: v8.29~7 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=47fb363432a69e5e0f4b1e92b601259ab7caf8b4;p=thirdparty%2Fcoreutils.git doc: mention which privileges are needed to chmod POSIX specification for chmod(1): https://pubs.opengroup.org/onlinepubs/9699919799/utilities/chmod.html * doc/coreutils.texi (chmod invocation): Add a sentence about who can change the file mode bits of a file - (almost) a copy from what POSIX requires. Fixes https://bugs.gnu.org/29207. --- diff --git a/doc/coreutils.texi b/doc/coreutils.texi index bd766e4e2a..de1f2eb365 100644 --- a/doc/coreutils.texi +++ b/doc/coreutils.texi @@ -11219,6 +11219,10 @@ line, @command{chmod} changes the permissions of the pointed-to file. In contrast, @command{chmod} ignores symbolic links encountered during recursive directory traversals. +Only a process whose effective user ID matches the user ID of the file, +or a process with appropriate privileges, is permitted to change the +file mode bits of a file. + A successful use of @command{chmod} clears the set-group-ID bit of a regular file if the file's group ID does not match the user's effective group ID or one of the user's supplementary group IDs,