Sticky bit
indicates that the “sticky” (save text image) bit is set. If the mode bit sticky bit is set on a directory, files
inside the directory may be renamed or removed only by the owner of
the file, the owner of the directory, or the superuser (even if the
modes of the directory would otherwise allow such an operation).[Example]
drwxrwxrwt 6 root root 4009984 Aug 4 14:19 tmp/
The syntax for setting the sticky bit on a dir /new directory is as follows:
chmod +t /new
The owner of a directory can set its sticky bit. The only people who can rename or remove any file in that directory are the file’s owner, the directory’s owner, and the superuser.
Here’s an example: the user max makes a world-writable directory and sets the sticky bit (shown as t here):
max# mkdir new
max# chmod 1777 new
max# ls -ld new
drwxrwxrwt 2 max kcmb 32 Nov 19 10:31 new
Other people create files in it. When jen tries to remove a file that belongs to era, she can’t:
jen# ls -l
total 2
-rw-r–r– 1 era kcmb 120 Nov 19 11:32 data.era
-rw-r–r– 1 jen kcmb 3421 Nov 19 15:34 data.jen
-rw-r–r– 1 peter kcmb 728 Nov 20 12:29 data.peter
jen# rm data.era
data.era: 644 mode ? y
rm: data.era not removed.
Permission denied

















