Linux Permissions and Security Cheat Sheet/Set sticky bit on shared directory

Allow only owners to delete their own files in a shared directory.

Section: Permissions ACLs and Special Bits

Set sticky bit on shared directory

bash
bash
chmod +t /shared/tmp
Explanation

Common on world-writable directories like `/tmp`.

Learn the surrounding workflow

Compare similar commands or jump into common fixes when this command is part of a bigger troubleshooting path.

Related commands

Same sheet · prioritizing Permissions ACLs and Special Bits
Set setgid on directory
Force new files to inherit the directory group.
OpenIn sheetbashsame section
Find world-writable paths
Audit files or directories writable by anyone.
OpenIn sheetbashsame section
Set default ACL on directory
Apply inherited ACL rules to new files and directories.
OpenIn sheetbashsame section
Find setuid files
Search for files with the setuid bit set.
OpenIn sheetbashsame section
Query passwd database
Resolve user information through NSS.
Show SELinux mode
Print current SELinux mode.