1STICKY(8) System Manager's Manual STICKY(8)
2
3
4
6 sticky - persistent text and append-only directories
7
9 The sticky bit (file mode bit 01000, see chmod(2)) is used to indicate
10 special treatment for certain executable files and directories.
11
13 While the `sticky bit' is set on a sharable executable file, the text
14 of that file will not be removed from the system swap area. Thus the
15 file does not have to be fetched from the file system upon each execu‐
16 tion. Shareable text segments are normally placed in a least-fre‐
17 quently-used cache after use, and thus the `sticky bit' has little
18 effect on commonly-used text images.
19
20 Sharable executable files are made by the -n and -z options of ld(1).
21
22 Only the super-user can set the sticky bit on a sharable executable
23 file.
24
26 A directory whose `sticky bit' is set becomes an append-only directory,
27 or, more accurately, a directory in which the deletion of files is
28 restricted. A file in a sticky directory may only be removed or
29 renamed by a user if the user has write permission for the directory
30 and the user is the owner of the file, the owner of the directory, or
31 the super-user. This feature is usefully applied to directories such
32 as /tmp which must be publicly writable but should deny users the
33 license to arbitrarily delete or rename each others' files.
34
35 Any user may create a sticky directory. See chmod(1) for details about
36 modifying file modes.
37
39 Since the text areas of sticky text executables are stashed in the swap
40 area, abuse of the feature can cause a system to run out of swap.
41
42 Neither open(2) nor mkdir(2) will create a file with the sticky bit
43 set.
44
45
46
474th Berkeley Distribution May 26, 1986 STICKY(8)