]> git.ipfire.org Git - thirdparty/coreutils.git/commitdiff
doc: mention which privileges are needed to chmod
authorBernhard Voelker <mail@bernhard-voelker.de>
Sat, 16 Dec 2017 22:07:27 +0000 (23:07 +0100)
committerBernhard Voelker <mail@bernhard-voelker.de>
Mon, 18 Dec 2017 07:07:12 +0000 (08:07 +0100)
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.

doc/coreutils.texi

index bd766e4e2ae29f7c7c259ac3b37759adfa750d9a..de1f2eb365e441ee3ba2fe5a6088827ef65a8f89 100644 (file)
@@ -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,