Unix and Linux Discussions Tagged with sticky bit |
|
Thread / Thread Starter |
Last Post |
Replies |
Views |
Forum |
|
|
|
6 |
331,683 |
Tips and Tutorials |
|
|
|
2 |
9,971 |
UNIX for Dummies Questions & Answers |
|
|
|
8 |
11,806 |
Solaris |
|
|
|
3 |
27,197 |
UNIX for Dummies Questions & Answers |
|
|
|
1 |
4,944 |
UNIX for Advanced & Expert Users |
|
|
|
10 |
15,352 |
UNIX for Dummies Questions & Answers |
|
|
|
2 |
70,477 |
Shell Programming and Scripting |
|
|
|
2 |
9,148 |
UNIX for Dummies Questions & Answers |
|
|
|
2 |
8,797 |
UNIX for Dummies Questions & Answers |
|
|
|
6 |
10,283 |
Cybersecurity |
|
|
|
3 |
3,809 |
UNIX for Dummies Questions & Answers |
|
|
|
3 |
13,945 |
UNIX for Dummies Questions & Answers |
sticky(5) Standards, Environments, and Macros sticky(5)
NAME
sticky - mark files for special treatment
DESCRIPTION
The sticky bit (file mode bit 01000, see chmod(2)) is used to indicate special treatment of certain files and directories. A directory for
which the sticky bit is set restricts deletion of files it contains. A file in a sticky directory can only be removed or renamed by a user
who has write permission on the directory, and either owns the file, owns the directory, has write permission on the file, or is a privi-
leged user. Setting the sticky bit is useful for directories such as /tmp, which must be publicly writable but should deny users permission
to arbitrarily delete or rename the files of others.
If the sticky bit is set on a regular file and no execute bits are set, the system's page cache will not be used to hold the file's data.
This bit is normally set on swap files of diskless clients so that accesses to these files do not flush more valuable data from the sys-
tem's cache. Moreover, by default such files are treated as swap files, whose inode modification times may not necessarily be correctly
recorded on permanent storage.
Any user may create a sticky directory. See chmod for details about modifying file modes.
SEE ALSO
chmod(1), chmod(2), chown(2), mkdir(2), rename(2), unlink(2)
BUGS
The mkdir(2) function will not create a directory with the sticky bit set.
SunOS 5.10 1 Aug 2002 sticky(5)