bug#80443: Warn upon chmod + file
Collin Funk <[email protected]> Thu, 19 Feb 2026 13:38:37 -0800
| Newsgroups | gmane.comp.gnu.core-utils.bugs |
|---|---|
| Message-ID | <[email protected]> |
Dan Jacobson <[email protected]> writes: > Any reason > $ chmod + file > should not trigger a warning? > > https://unix.stackexchange.com/questions/804566/shouldnt-chmod-file-be-an-error > https://debbugs.gnu.org/80436 As Stephen Harris posted, POSIX requires it to behave as it currently does: + If perm is not specified, the '+' operation shall not change the file mode bits. If who is not specified, the file mode bits represented by perm for the owner, group, and other permissions, except for those with corresponding bits in the file mode creation mask of the invoking process, shall be set. Otherwise, the file mode bits represented by the specified who and perm values shall be set. Also the grammar just below that on the POSIX page [1] allows an "op" without a "permlist". Collin [1] https://pubs.opengroup.org/onlinepubs/9799919799/utilities/chmod.html