LFCS 5.4: ACLs
Giving extra users and groups access with access control lists, default ACLs for new files, the mask, and copying files with their ACLs.
Before you start
The lab creates these users (password Lab-Pass-1): alice, bob in
group finance, and dana and eve in group devs. It sets up:
/srv/reports, groupfinance, with two reports in it;/srv/project, groupdevs, with files of the team, some of which already have ACLs;/srv/shared/plan.txt, which has an ACL entry givingaliceread and write access, but someone has since runchmod 640on it.
The acl tools (getfacl, setfacl) are installed.
Tasks
- Give user
aliceread and write access to/srv/reportsand the files in it, without changing their group or adding alice to it. - Make every new file in
/srv/projectwritable by groupdevs, whatever the creator's umask. alicecan no longer write to/srv/shared/plan.txt, although her ACL entry saysrw-. Find out why, and write the name of the ACL entry that causes it to/root/lab-answers/3. Then fix it without removing alice's entry.- Copy
/srv/projectto/backup/projectwith its ACLs (do this after task 2). Test it by comparinggetfacl -R .run in each directory; on XFS the copy may list the same files in a different order.
Hints
getfacl,setfacl -m u:NAME:PERMS,-R, and capitalX.setfacl -d; test withsudo -u eve bash -c 'umask 077; touch FILE'.#effective:ingetfacl;setfacl -m m::....cp -a,rsync -aAortar --acls.