The sticky bit is an access permission that affects the handling of executable files and directories.
- If it's set for an executable file, the kernel keeps the executable in memory for a while after the program ends—the exact length of time depends on what else is happening in the system. This can improve the performance if you run a program (for example, a compiler or linker) frequently.
- For a directory, it affects who can delete a file in the directory. You always need to have write permission on the directory, but if the sticky bit is set for the directory, you also need to be the owner of the file or directory or have write permission on the file.
If the third character in a set of permissions is t (for example, r-t), the sticky bit and execute permission are both set; T indicates that only the sticky bit is set.
Last modified: 2014-05-14