Make world-writable directories safe by limiting who can remove or rename files. 06.12.2025 | reading time: 3 min Shared temporary folders invite chaos: any user can create, rename or delete files unless you intervene; the sticky bit is a simple permission tweak that lets only the file owner and root remove or rename files inside a world-writable directory. See it in action Create a demo directory, show permissions, set the sticky bit and inspect the change: ```bash mkdir /tmp/teamdir && chmod 0777 /tmp/teamdir && ls -ld /tmp/teamdir ``` Typical output before the sticky bit: ```text drwxrwxrwx 2 root root 4096 Oct 1 12:00 /tmp/teamdir ``` Now set the sticky bit and re-list: ```bash chmod +t /tmp/teamdir && ls -ld /tmp/teamdir ``` Typical output after: ```text drwxrwxrwt 2 root root 4096 Oct 1 12:01 /tmp/teamdir ``` When and how it helps Use the sticky bit on directories that must be world-writable but not anarchic, for example shared /tmp-like folders; only the owner and root can remove or rename files there, which you see as a trailing "t" in the permissions string; if the other-execute bit is missing you will see an uppercase "T" instead. Important options and commands You can apply the sticky bit symbolically with `chmod +t`, or numerically with the leading 1 as in `chmod 1777`; find sticky directories with `find / -perm -1000 -type d`; remember ownership matters (you need to own the directory or be root to change its mode) and combine sticky bit use with setgid, ACLs or umask for more sophisticated group and default-permission behavior. Related command overview Beyond `chmod` the usual companions are `chown` to adjust ownership, `find` to locate directories with the sticky bit, and ACL tools such as `setfacl` and `getfacl` when you need per-user rules that go beyond Unix bits. Final thought and next step The sticky bit is a small, low-risk tool that solves a common sharing problem: set it on public writeable directories and avoid accidental deletions; to master Linux permissions and prepare for certification consider deeper practice and focused exam prep at bitsandbytes.academy for CompTIA Linux+ or LPIC-1 readiness. Join Bits & Bytes Academy First class LINUX exam preparation. filesystem security utilities scripting storage