application background
The shared directory of 5 people is located in the directory /home/cakingroups, which can only be used by these 5 people, and everyone can do any operation in this directory, while others have no right to use the permission of the directory. How to set it?
solution
Step 1: Create a directory
[root@localhost ~]# mkdir /home/cakingroups
Step 2: Give the cakingroup group permission to the /home/cakingroups directory
[root@localhost ~]# chgrp cakingroup /home/cakingroups
Step 3: Give the /home/cakingroups directory operation permissions
[root@localhost ~]# chmod 2770 /home/cakingroups
Step 4: View /home/cakingroups directory permissions
[root@localhost ~]# ll -d /home/cakingroups
drwxrws---. 2 root cakingroup 6 Nov 6 11:04 /home/cakingroups