sticky(8)sticky(8)Namesticky - executable files with persistent text
Description
The sticky bit (file mode bit 01000), is used to indicate special
treatment for certain executable files and directories.
While the sticky bit, mode 01000 is set on a sharable executable file,
the text of that file will not be removed from the system swap area.
Thus the file does not have to be fetched from the file system upon
each execution. As long as a copy remains in the swap area, the origi‐
nal text cannot be overwritten in the file system, nor can the file be
deleted. Directory entries can be removed so long as one link remains.
Sharable files are made by the -n and -z options of
To replace a sticky file that has been used, clear the sticky bit with
and execute the old program to flush the swapped copy. This can be
done safely even if others are using it. Overwrite the sticky file.
If the file is being executed by any process, writing will be pre‐
vented. It suffices to simply remove the file and then rewrite it,
being careful to reset the owner and mode with and Set the sticky bit
again.
A directory whose sticky bit is set becomes an append-only directory,
or, more accurately, a directory in which the deletion of files is
restricted. A file in a sticky directory may only be removed or
renamed by a user if the user has write permission for the directory
and the user is the owner of the file, the owner of the directory, or
the superuser. This feature is usefully applied to directories such as
which must be publicly writable but should deny users the license to
arbitrarily delete or rename each others' files.
Restrictions
Only the superuser can set the sticky bit.
Is largely unnecessary on the VAX. It matters only for large programs
that will page heavily to start, since text pages are normally cached
incore as long as possible after all instances of a text image exit.
See Alsochmod(2)
VAX sticky(8)