Dit deel is nog niet vertaald. Je ziet de Engelse tekst.
Doel
Set safer default permissions, give one extra group access with an ACL, protect a file, and fix a broken access path.
Voordat je begint
- Finish lab 7.1 first. Work on server1 as root unless a task says otherwise.
Taken
Vink een taak aan als hij klaar is. Alleen je browser onthoudt dit.
- For user
annaonly, new files must get640and new folders750. - Members of
accountmust be able to read (not change) everything in/data/sales, also files that are created later. - User
carol(not in any team) must be able to read/data/sales/bob.txtonly. - Make
/data/sales/bob.txtimmutable, try to delete it as root, then remove the protection again. - Run
chmod 700 /data(a "mistake"). Asanna, try to open/data/sales. Find the cause withnamei -land fix it so that the team folders work again and others still cannot list/data.
Controleer je werk
su - anna -c 'umask; touch /tmp/x1; mkdir /tmp/x2; ls -ld /tmp/x1 /tmp/x2'
getfacl /data/sales
su - bob -c 'echo test > /data/sales/new.txt'; getfacl /data/sales/new.txt
su - carol -c 'cat /data/sales/bob.txt'
ls -ld /data; lsattr /data/sales/bob.txt- anna: umask
0027, file-rw-r-----, folderdrwxr-x---. /data/saleshasgroup:account:r-xanddefault:group:account:r-x;new.txthasgroup:account:r--(effective).- carol can read
bob.txt. /dataisdrwx--x--x(or711);bob.txthas noiattribute.
Hints
Toon de hints
- One user:
~/.bashrc. All users:/etc/profile.d/. - Default ACL:
setfacl -d -m. UserXso folders getxand files do not. - carol needs
xon/data/salesto reach the file, andron the file.setfacl -m u:carol:xon the folder is enough for the path. chmod 711 /datalets everybody pass through without listing.
Oplossing
Toon de oplossing
- umask for anna.
echo "umask 027" >> /home/anna/.bashrc - Normal and default ACL for the group account.
- Path and file for carol.
- Immutable test.
- Find and fix the path problem.
Mijn notities
Nog geen notities.