Stop the permission headache with sticky bits on shared folders

Permissions & Security (Chmod/Chown/ACLs/SELinux/AppArmor)

Stop the permission headache with sticky bits on shared folders

🧩 The Challenge

You know that fun moment when you open a shared project directory and realize some junior dev accidentally deleted a file they didn’t own? It’s enough to make you want to walk out of the office entirely.

💡 The Fix

Use the sticky bit on your group-writable directories to make sure users can only delete the files they actually created themselves. It’s a total lifesaver for team sanity.

chmod +t /path/to/shared/directory

⚙️ Why It Works

Setting this special bit tells the kernel that even if someone has write and execute access to a folder, they aren’t allowed to rename or unlink files unless they are the owner, the directory owner, or root. It basically prevents the Wild West scenario where one user’s clumsy rm command nukes everyone else’s hard work.

🚀 Pro-Tip: Run ls -ld on the directory and look for the t at the end of the permissions string to confirm it’s active.

Linux Tips & Tricks | © ngelinux.com | 9/1/2026

0 0 votes
Article Rating
Subscribe
Notify of
guest

0 Comments
Newest
Oldest Most Voted