Stop fighting with POSIX permissions when you need fine-grained file access
Permissions & Security (Chmod/Chown/ACLs/SELinux/AppArmor)
Stop fighting with POSIX permissions when you need fine-grained file access
🧩 The Challenge
You know the pain when a developer needs access to a specific log directory, but adding them to a group ruins the security posture for the rest of the box. It drives me up a wall having to choose between breaking permissions or just chmod-ing things to 777 like a caveman.
💡 The Fix
Use ACLs instead of trying to shoehorn everything into user-group-others. They let you grant specific access to a user or group without messing with the primary ownership bits.
setfacl -m u:username:rwx /var/log/app/data
getfacl /var/log/app/data
⚙️ Why It Works
These entries live alongside standard permissions and let you surgically inject access for just one user. If you see a plus sign at the end of your ls -l output, you’ll know exactly what’s going on.
🚀 Pro-Tip: Always check if your filesystem is mounted with the acl option if things aren’t behaving, though most modern distros have this handled out of the box.
Linux Tips & Tricks | © ngelinux.com | 8/29/2026
