Unleashed v1.4
[unleashed.git] / share / man / man5 / sticky.5
blob52badee85762da956f6156517a5fd2da44ce101b
1 '\" te
2 .\" Copyright (c) 2002, Sun Microsystems, Inc.  All Rights Reserved.
3 .\" Copyright (c) 1983 Regents of the University of California.  All rights reserved.  The Berkeley software License Agreement  specifies the terms and conditions for redistribution.
4 .TH STICKY 5 "Aug 1, 2002"
5 .SH NAME
6 sticky \- mark files for special treatment
7 .SH DESCRIPTION
8 .sp
9 .LP
10 The \fIsticky bit\fR (file mode bit  \fB01000\fR, see \fBchmod\fR(2)) is used
11 to indicate special treatment of certain files and directories. A directory for
12 which the sticky bit is set restricts deletion of files it contains.  A file in
13 a sticky directory can only be removed or renamed by a user who has write
14 permission on the directory, and either owns the file, owns the directory, has
15 write permission on the file, or is a privileged user. Setting the sticky bit
16 is useful for directories such as \fB/tmp\fR, which must be publicly writable
17 but should deny users permission to arbitrarily delete or rename the files of
18 others.
19 .sp
20 .LP
21 If the sticky bit is set on a regular file and no execute bits are set, the
22 system's page cache will not be used to hold the file's data. This bit is
23 normally set on swap files of diskless clients so that accesses to these files
24 do not flush more valuable data from the system's cache. Moreover, by default
25 such files are treated as swap files, whose inode modification times may not
26 necessarily be correctly recorded on permanent storage.
27 .sp
28 .LP
29 Any user may create a sticky directory. See \fBchmod\fR for details about
30 modifying file modes.
31 .SH SEE ALSO
32 .sp
33 .LP
34 \fBchmod\fR(1), \fBchmod\fR(2), \fBchown\fR(2), \fBmkdir\fR(2),
35 \fBrename\fR(2), \fBunlink\fR(2)
36 .SH BUGS
37 .sp
38 .LP
39 The \fBmkdir\fR(2) function will not create a directory with the sticky bit
40 set.