1.4 KiB
1.4 KiB
RHCSA 1.6: Standard permissions
Owners and modes on a file, a directory only its group can use, fixing a whole tree in one command, and finding the directory that blocks access.
Before you start
The lab creates users alice and bob (neither is in wheel), a tree
/srv/project whose files and directories have a mix of modes, and
/opt/app/conf/app.conf, mode 644, that alice can't read. Write the
finding of task 4 to /root/lab-answers/4.
Tasks
- Create
/srv/reports/q3.txt, owned byaliceand the groupwheel, readable and writable by alice, readable by the group, and with no access for anyone else. - Make the directory
/srv/reportsusable by its group (list, enter, create files) but closed to others. - Make every directory under
/srv/projectmode 755 and every file 644 in onechmodcommand. - Find out why alice can't read
/opt/app/conf/app.confalthough the file is mode 644. Write the full path of the directory that blocks her to/root/lab-answers/4, then fix it so she can read the file.
Hints
chown alice:wheel,chmod 640orchmod u=rw,g=r,o=.- A directory needs
xto be entered andrto be listed:770.su - bob -c 'ls /srv/reports'should fail. chmod -R u=rwX,go=rX: capitalXsets execute only on directories (and files that already have it, so check the files too).namei -lshows the permissions of every directory on the path.