setfacl
Prince Rogers Nelson plays lead guitar in a rock band by night, and is a RHEL Engineer at Ford Motors by day. During his breaks at work, he does some minor tasks on his RHEL laptop to support his band. He maintains a list of backup guitarists that can fill in for him at shows. He groups them based on proficiency:
- A_List = highly proficient
- B_List = proficient
- C_List = good
Prince wants to make sure that A_list guitarists have rwx permissions to /home/prince/gig_list.sh, B_list guitarists have rw permissions, and C_List guitarists have r permissions.
Please list all commands Prince will need to create the A_List, B_List, and C_List groups.
Please list all of the commands that Prince will need to execute to set the proper permissions.
To create the A_List, B_List, and C_List groups and set the proper permissions for each group on /home/prince/gig_list.sh, Prince will need to execute the following commands:
- Create the A_List, B_List, and C_List groups:
- $ sudo groupadd A_List
$ sudo groupadd B_List
$ sudo groupadd C_List
- $ sudo groupadd A_List
- Add the appropriate guitarists to each group:
- $ sudo usermod -a -G A_List guitarist1
$ sudo usermod -a -G A_List guitarist2
$ sudo usermod -a -G B_List guitarist3
$ sudo usermod -a -G B_List guitarist4
$ sudo usermod -a -G C_List guitarist5
$ sudo usermod -a -G C_List guitarist6
- $ sudo usermod -a -G A_List guitarist1
- Set the permissions on /home/prince/gig_list.sh:
- $ sudo chown prince:A_List /home/prince/gig_list.sh
$ sudo chmod 770 /home/prince/gig_list.sh
$ sudo chmod g+rwx,o-rwx /home/prince/gig_list.sh
$ sudo setfacl -m g:A_List:rwx /home/prince/gig_list.sh
$ sudo setfacl -m g:B_List:rw /home/prince/gig_list.sh
$ sudo setfacl -m g:C_List:r /home/prince/gig_list.sh
- $ sudo chown prince:A_List /home/prince/gig_list.sh