π Managing Access Control Lists (ACLs)
Basic Linux permissions (rwx for user, group, others) are sometimes too rigid. ACLs let you give specific permissions to individual users or groups without changing the main file owner.
Think of ACLs like customizing who can enter specific rooms in a shared building, rather than only using the standard keys for owner/group/others.
5.1 Viewing ACLs
Shows all ACL entries for a file
# file: report.txt # owner: alice # group: marketing user::rw- user:bob:r-- group::r-- mask::rwx other::r--
user:bob:r-- β Bob can read, even if he's not the owner or in the group
5.2 Setting ACLs
Example:
Gives Bob read and write access
Owner and group permissions remain intact
5.3 Removing ACLs
Example:
Removes Bob's special access
5.4 Recursive ACLs for directories
Applies ACL to all files/folders inside project/
5.5 Quick Tips
ACLs are powerful but can get complex, so use them carefully.
Combine with ls -l and getfacl to always know who can do what.
Useful in multi-user environments like shared servers or project directories.
Real-life analogy
Analogy: Giving Bob a custom key to certain rooms in the building, while everyone else keeps their normal access.
β That completes the full Permissions and Security lesson.
If you want, I can make a visual summary cheat-sheet showing rwx, chmod, chown, sudo, and ACLs in one viewβit makes remembering all this super easy.
Do you want me to do that?