Sticky Bit

What Does Sticky Bit Mean?

In Unix-like operating systems, a sticky bit is a permission bit which is set on a file or folder, thereby permitting only the owner or root user of the file or
folder to modify, rename or delete the concerned directory or file. No other user would be permitted to have these privileges on a file which has a sticky bit. In Unix-like systems, without the sticky bit on, any user can modify, rename or delete the directory or file regardless of the owner of the file or folder.


Techopedia Explains Sticky Bit

Introduced in the fifth edition of Unix, the sticky bit was created for only pure executable files. When introduced, files with a sticky bit ensured the text segment of the executable application was available in swap space even after the exit of the process. This allows the speeding up of executions of the frequently used executable programs. Presently, this feature has been abandoned by many and is only retained in Unixware and HP-UX.

The sticky bit is mostly used on the folders residing within file systems inside Unix-like operating systems. When the sticky bit is set, the filesystem treats such files or directories in a unique way that only the owner or the root owner can have rights of modifying, deleting or renaming of these. In Solaris-like operating systems, when the sticky bit is set on non-executable files, the files are not cached by the kernel. This helps not only to avoid allowing access to these files, but also helps in flushing important data from the system cache with respect to the files. In some cases, a sticky bit is also used for indicating that a particular file is yet to be mounted, thus allowing programs to ignore unmounted files.


Related Terms

Margaret Rouse

Margaret Rouse is an award-winning technical writer and teacher known for her ability to explain complex technical subjects to a non-technical, business audience. Over the past twenty years her explanations have appeared on TechTarget websites and she's been cited as an authority in articles by the New York Times, Time Magazine, USA Today, ZDNet, PC Magazine and Discovery Magazine.Margaret's idea of a fun day is helping IT and business professionals learn to speak each other’s highly specialized languages. If you have a suggestion for a new definition or how to improve a technical explanation, please email Margaret or contact her…