RHCSA 10.2: Default file permissions
A umask for one user, and a default umask for everyone.
Before you start
The lab creates users alice and bob (password Lab-Pass-1), and notes
the files in /etc/profile.d/ so reset can take out the ones you add.
Tasks
- Make new files of user
alicereadable and writable only by her, persistently:su - alice -c 'umask; touch t; ls -l t'prints0077and-rw-------. - Make every user's new directories
rwxr-x---by default: for a user without their own umask line,su - bob -c 'umask; mkdir d; ls -ld d'prints0027anddrwxr-x---.alicekeeps her own umask.
Hints
umask 077in~alice/.bashrc.umask 027in a file in/etc/profile.d/ending in.sh. Don't edit/etc/profileor/etc/bashrc.