LAB-PERM-06 - Access Control Lists (ACLs)
Access Control Lists (ACLs)
Understand when ACLs solve a real access problem and practice reading and adding a simple ACL entry without turning the file into a mystery.
- Explain why ACLs exist beyond owner, group, and other.
- Read a simple ACL entry with getfacl and add one with setfacl.
- Use ACLs on disposable files while learning so you can remove them cleanly and verify the effect.
Part A: The Field Guide
The normal owner-group-other model is simple, but sometimes it is not expressive enough.
ACLs help when you need an extra rule such as:
- one specific additional user may read a file
- one specific group needs access without becoming the main file group
That makes ACLs useful, but also easier to forget. A file can look ordinary until you notice the + in ls -l.
Practical Rule
Use ACLs when they solve a specific access problem cleanly. Do not pile on extra ACL entries when an ordinary owner and group model would already be clear enough.
The two core commands
getfaclreads the ACLsetfaclchanges the ACL
Part B: The Drill Deck
Terminal required: keep this lab in a sandbox and use a known local user or group if ACL tools are installed on your system.
G Guided Step by step - type exactly this and compare the result >
Exercise G1: Create a sandbox file
mkdir -p ~/acl_lab cd ~/acl_lab touch vault.txt ls -l vault.txt
Exercise G2: Add one ACL entry
- Choose a known local user such as
rootif appropriate on your system - Run
setfacl -m u:root:r vault.txt - Run
ls -l vault.txt - Notice the
+at the end of the permission string
Exercise G3: Read the ACL
- Run
getfacl vault.txt - Find the normal owner and group entries
- Find the extra user entry you added
- Remove it again with
setfacl -x u:root vault.txt - Confirm the
+disappears after removal
S Solo Task described, hints available - figure it out >
Exercise S1: Explain the plus sign
In your own words, explain what the + in ls -l tells you and why checking only the rwx string may no longer be enough.
Exercise S2: ACL versus extra group
Describe one case where creating a whole new group may be overkill, and one ACL entry could be a cleaner short-term solution.
M Mission Real scenario - no hints, combine multiple skills >
Mission M1: Add and remove one temporary exception
In the sandbox:
- add one extra read-only ACL for a known user or group
- verify it with
getfacl - remove the extra entry
- verify that the file has returned to a simpler state
If you can do that cleanly, you understand the core value of ACLs without turning the file into a permission maze.