>From 5252904a7f83e13ba37305aca4ac795deffe054b Mon Sep 17 00:00:00 2001 From: Bernhard Voelker Date: Sat, 16 Dec 2017 23:07:27 +0100 Subject: [PATCH] doc: mention which privileges are needed to chmod [1] https://pubs.opengroup.org/onlinepubs/9699919799/utilities/chmod.html * doc/coreutils.texi (chmod invocation): Document who can change the file mode bits of a file - (almost) a copy from POSIX specification [1]. Fixes https://bugs.gnu.org/29207. --- doc/coreutils.texi | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/doc/coreutils.texi b/doc/coreutils.texi index bd766e4e2..de1f2eb36 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, -- 2.15.1