0% found this document useful (0 votes)
14 views11 pages

ACLs in Linux

Uploaded by

ashish
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
14 views11 pages

ACLs in Linux

Uploaded by

ashish
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 11

Understanding Access Control

Lists (ACLs) in Linux


Advanced File Permissions Explained
Agenda
• 1. What are ACLs?
• 2. Why use ACLs?
• 3. Types of ACLs
• 4. How to Enable and Use ACLs
• 5. Practical Examples
• 6. Conclusion
What Are ACLs?
• Definition: ACLs are a feature that provides
more fine-grained control over file
permissions than traditional Linux file
permissions.

• Key Points:
• - Extends beyond owner, group, and others.
• - Allows multiple users or groups with
different permissions.
Why Use ACLs?
• Challenges with Traditional Permissions:
• - Limited to Owner, Group, Others.
• - Lack of granularity.

• Advantages of ACLs:
• - Assign permissions to specific users/groups.
• - Flexible and scalable for complex
environments.
Types of ACLs
• 1. Access ACLs:
• - Control access to files and directories.
• 2. Default ACLs:
• - Define permissions inherited by newly
created files/directories.
Enable ACLs on Filesystem
• 1. Check if ACL is supported:
• tune2fs -l /dev/sdX | grep options

• 2. Mount with ACL option:


• mount -o remount,acl /dev/sdX
/mount/point

• 3. Permanent entry in /etc/fstab:


• /dev/sdX /mount/point ext4 defaults,acl 0 2
Basic ACL Commands
• View ACL:
• getfacl filename

• Set ACL:
• setfacl -m u:username:rw filename

• Remove ACL:
• setfacl -x u:username filename
Practical Examples
• 1. Assign Read/Write to a User:
• setfacl -m u:john:rw file.txt

• 2. Assign Permissions to a Group:


• setfacl -m g:developers:r file.txt

• 3. Remove ACL for a User:


• setfacl -x u:john file.txt
Case Study Example
• Scenario: A shared directory /projects where:
• - Developers have read/write access.
• - Testers have read-only access.

• Solution:
• setfacl -m g:developers:rw /projects
• setfacl -m g:testers:r /projects
Best Practices
• 1. Use ACLs sparingly; prefer groups for
simplicity.
• 2. Regularly review and clean up unnecessary
ACLs.
• 3. Always test ACL configurations in a dev
environment first.
Conclusion
• Summary:
• - ACLs provide advanced permissions control.
• - Useful for multi-user environments.

• Next Steps:
• - Explore ACL use cases in your environment.
• - Practice with setfacl and getfacl commands.

You might also like