Home

stickybit

The sticky bit, formally known as the sticky permission bit, is a special file mode in Unix-like operating systems. When set on a directory, it restricts deletion and renaming of the directory’s files to the file’s owner, the directory owner, or the superuser. It is most commonly used on world-writable directories such as /tmp.

In practice, if a directory has the sticky bit set, ordinary users can create or modify files

The sticky bit is one of three special permission bits in the Unix file mode (the others

Historically, the sticky bit on regular files had different meanings in some early Unix systems, but on

Examples: to enable the sticky bit on /tmp with standard permissions, use chmod 1777 /tmp or chmod

there,
but
they
cannot
delete
or
rename
files
owned
by
others
within
that
directory.
The
ability
to
delete
or
rename
depends
on
the
usual
write
permissions
on
the
directory,
plus
the
ownership
of
the
file
in
question.
The
sticky
bit
therefore
helps
prevent
users
from
removing
or
altering
each
other’s
files
in
shared
spaces.
being
setuid
and
setgid).
Its
octal
value
is
01000.
When
listing
a
directory
with
ls
-l,
the
sticky
bit
appears
in
the
others’
execute
position
as
a
t
(lowercase)
if
others
have
execute
permission,
or
as
a
T
(uppercase)
if
others
do
not.
modern
systems
its
primary
practical
use
is
on
directories.
On
such
directories,
it
provides
a
simple
access
control
mechanism
for
shared
locations.
+t
/tmp.
To
remove
it,
use
chmod
0777
/tmp
or
chmod
-t
/tmp.