Stop your inherited permissions from turning into a directory dumpster fire
Permissions & Security (Chmod/Chown/ACLs/SELinux/AppArmor)
Stop your inherited permissions from turning into a directory dumpster fire
🧩 The Challenge
You know that feeling when a new file gets dropped into a shared folder and suddenly nobody else can touch it? It’s a classic headache where you’re constantly chasing group ownership issues on a busy project share.
💡 The Fix
Flip the setgid bit on the parent directory so everything inside automatically inherits the folder’s group ownership. It saves you from running chgrp every time a dev saves a file.
chmod g+s /path/to/shared/directory
⚙️ Why It Works
Setting the setgid bit on a directory forces new files to inherit the group of the parent directory instead of the primary group of the user who created them. This is the only way to keep a shared workspace sane without relying on sloppy umask settings.
🚀 Pro-Tip: Combine this with a default ACL if you really need to force specific read/write access for everyone on the team regardless of their individual umask.
Linux Tips & Tricks | © ngelinux.com | 11/26/2026
