ACLs and what new files inherit
Owner, group and other is three slots, and a shared directory routinely needs four. This guide grants one user read access and another write access without touching group membership, shows the mask turning a chmod into a change nobody asked for, sets a default ACL and proves what a new file and a new subdirectory inherit - then checks what a copy and an archive keep.
Security Guide 23 of 28 Intermediate
- OSAlmaLinux 10.2
- Kernel6.12.0-211.7.3.el10_2
- systemd257
- Mandatory access controlAppArmor on Ubuntu, SELinux enforcing on Alma
- TimeAbout 26 min
- Firewallufw / nftables 1.1.6 - firewalld / nftables 1.1.5
| Server Name | IP Address | OS | Roles | CPU | RAM | HDD |
|---|---|---|---|---|---|---|
| LPLUS-B01 | 192.168.0.74 | AlmaLinux 10.2 | RPM-family host - dnf, firewalld, NetworkManager, SELinux | 2 Core | 4 GB | 50 GB |
This guide includes
Use this when a second team needs different access to the same directory and adding everyone to one group is the wrong answer. This matters because the mask makes ACLs behave in a way that looks broken, and because a default ACL is the only thing that makes the arrangement survive the next file anyone creates.
- reading
getfacloutput and recognising the mode bits inside it - granting one user access without changing any group membership
- explaining
#effective:and whychmodon an ACL directory changes the mask - setting a default ACL and proving what a new file and subdirectory inherit
- knowing that existing files are untouched by a default added later
- keeping ACLs across
cpandtar, and backing a whole tree up withgetfacl -R
Before you start
- a-service-an-account-and-the-permission-between-them
-
Where three sets of permission bits run out
-
One more user, with access the mode bits cannot express
-
The mask, and why chmod appears to lie
-
What new files inherit
-
What survives a copy and an archive
-
Backing the whole tree up and putting it back
-
Putting the machine back