RHCSAv10 · RHEL 10

Exercises

Exercise: ACLs and a shared directory

updated 2026-10-19 by seed

Tasks

  1. Create /srv/share owned by root:devs, setgid, 2770.
  2. Give user audit read/execute only (ACL), without adding them to devs.
  3. Make every new file in the directory inherit a devs:rw ACL.
  4. Verify both ACLs.

Verify

ls -ld /srv/share                   # drwxrws--- (the + means an ACL exists)
getfacl -p /srv/share | grep -E 'audit|default:group:devs'
sudo -u audit ls /srv/share         # allowed
sudo -u audit touch /srv/share/x    # denied

Solution

sudo mkdir -p /srv/share && sudo chown root:devs /srv/share
sudo chmod 2770 /srv/share
sudo setfacl -m u:audit:r-x /srv/share
sudo setfacl -R -m d:g:devs:rwx /srv/share