Skip to content

Advanced Topics | Sticky Bit#

What is a Sticky Bit?#

A sticky bit is a special type of file permission bit that is set on a file or a directory in Unix-like operating systems. When the sticky bit is set on a file, only the file owner, the directory owner, or the root user can delete or rename the file. When set on a directory, it restricts write and deletion permission to the files within the directory to only the owner of the file or the owner of the directory, and not to others who have write permission to the directory. The sticky bit helps to prevent accidental deletion of files in a shared directory.

How are Sticky Bits Used on Oak?#

A sticky bit is automatically added to the root of each Oak Storage space. It's recommended for shared space to minimize the effect of accidental deletion. This is to ensure, only at the base level, that only the owner of a file or directory can delete or rename the object.

The use of a sticky bit has saved groups from data loss in the past by preventing well-meaning group members from completing recursive actions that would have otherwise unintentionally modified (or worse - deleted!) large swaths of data that they did not own, but had permission to write.

Additional Support#

If you do not want a sticky bit enabled on your Oak space, please send us an email at SRCC-Support@stanford.edu and we can help you disable this feature.