Advanced Topics | Sticky Bit#
What is a Sticky Bit?#
A sticky bit is a special permission flag in Unix-like operating systems that can be set on a file or directory. When applied to a directory, the sticky bit restricts deletion or renaming of files within that directory to only the file's owner, the directory's owner, or the root user. This means that even if other users have write permission to the directory, they cannot delete or rename files they don't own.
When the sticky bit is set on files (which is rare in modern systems), it has historical significance, but its use has mostly been deprecated. On directories, however, it plays an important role in preventing accidental or unauthorized deletion of files in shared directories.
How are Sticky Bits Used on Oak?#
A sticky bit is automatically applied to the root directory of each Oak Storage space. This is especially useful in shared environments to prevent accidental deletions. It ensures that only the owner of a file or the directory's owner can delete or rename objects at the base level, even if other users have write access.
This has protected many groups from unintentional data loss, such as when a well-meaning team member performs a recursive operation that could modify or delete large amounts of data they don't own but have access to write.
Additional Support#
If you do not want the sticky bit enabled on your Oak space, you can request to have it disabled by emailing SRCC-Support@stanford.edu. We are happy to assist with any questions or adjustments.