1.3 KiB
1.3 KiB
RHCSA 6.5: Fixing file permission problems
A shared group directory, a file one user can't reach, and what chmod
does to an ACL's mask.
Before you start
The lab creates group devs with members alice and bob, and a third
user, carol, who isn't in it (password Lab-Pass-1 for all three). It
also creates the directory /srv/reports (mode 750, owned by root) with
an ACL entry that gives bob read and execute access.
Tasks
- Make a directory
/srv/devswhere every new file belongs to groupdevsand is writable by its members, and members can't delete each other's files. - As root, create
/srv/secret/f.txt(mode644) in a directory/srv/secretwith mode700. Find out whybobcan't read it, then let onlybobread it, without giving access to anyone else. - Run
chmod 700 /srv/reportsand look atbob's ACL entry withgetfacl. Write the effective permissions it shows to/root/lab-answers/3, then givebobhis access back withsetfacl -m m::rx.
Hints
chgrp,chmod 3770(org+s,o+t),setfacl -d -m g:devs:rw;ls -ld,getfacl. Test as the users:su - alice,sudo -u bob.namei -l /srv/secret/f.txt;setfacl -m u:bob:xon the directory.getfacl -c /srv/reportsshows#effective:next to masked entries.