[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Error in chmod man page
From: |
Benjamin Davenport |
Subject: |
Error in chmod man page |
Date: |
Sat, 22 Jul 2006 12:12:22 -0500 |
User-agent: |
Thunderbird 1.5.0.4 (Windows/20060516) |
The chmod man page seems to incorrectly report the behavior of the
sticky bit on directories.
man chmod reports, in part:
STICKY DIRECTORIES
When the sticky bit is set on a directory, files in that
directory may
be unlinked or renamed only by root or their owner.
This is false (at least for chmod 5.93 and kernel 2.6.15-1.2054_FC5).
When the sticky bit is set on a directory, files in that directory may
be unlinked or renamed only by root or their owner OR THE DIRECTORY'S
OWNER. The man page would seem to indicate that the sticky bit
effectively disables rename/unlink capabilities conferred by the write
bit being set on the directory, when in fact it disables only
rename/unlink capabilities conferred by the write bit being set for
group and other on the directory. This behavior seems correct, since it
protects the directory owner's ability to delete the directory, even in
the face of third parties adding files to it, but the man page does not
mention this behavior.
To test:
mkdir foo
chmod 1775 foo
(as another user with appropriate write permissions) touch foo/bar
(as the first user) rm foo/bar #SUCCEEDS
The man page would indicate that the first user's rm would fail, since
the first user is neither the file's owner nor root.
-Ben Davenport
- Error in chmod man page,
Benjamin Davenport <=