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
10 months agoCarin
10 months agoStephanie
11 months agoStevie
11 months agoSonia
11 months agoAlpha
11 months agoLourdes
11 months agoArmanda
11 months agoJina
11 months agoGeorgene
11 months agoShaquana
11 months agoWayne
11 months agoMaurine
11 months ago