RedHat EX200 Exam - Topic 2 Question 48 Discussion
Part 1 (on Node1 Server)Task 4 [Controlling Access to Files]Create collaborative directory /mnt/shares with the following characteristics:Group ownership of /mnt/shares should be sharegrp.The directory should be readable, writable and accessible to member of sharegrp but not to any other user. (It is understood that root has access to all files and directories on the system)Files created in /mnt/shares automatically have group ownership set to the sharegrp group.
A) Explanation:
*
[root@node1 ~]# mkdir -p /mnt/shares
[root@node1 ~]# ls -lrt /mnt/
[root@node1 ~]# chgrp sharegrp /mnt/shares/
[root@node1 ~]# chmod 2770 /mnt/shares/
[root@node1 ~]# ls -lrt /mnt/
### For Checking ###
[root@node1 ~]# su - harry
[harry@node1 ~]$ cd /mnt/shares/
[harry@node1 shares]$ touch harry
[harry@node1 shares]$ logout
[root@node1 ~]# su - natasha
[natasha@node1 ~]$ cd /mnt/shares/
[natasha@node1 shares]$ touch natasha
[natasha@node1 shares]$ ls -lrt
-rw-rw-r--. 1 harry sharegrp 0 Mar 21 06:03 harry
-rw-rw-r--. 1 natasha sharegrp 0 Mar 21 06:03 natasha
Dyan
8 months agoCarin
8 months agoStephanie
9 months agoStevie
9 months agoSonia
9 months agoAlpha
9 months agoLourdes
9 months agoArmanda
9 months agoJina
9 months agoGeorgene
9 months agoShaquana
9 months agoWayne
9 months agoMaurine
9 months ago