Limited Time Offer
15%
Off
Here are all the actual test exam dumps for IT exams. Most people prepare for the actual exams with our test dumps to pass their exams. So it's critical to choose and actual test pdf to succeed.
Suggested Answer:
by ubiquituz at Nov 26, 2024, 12:25 PM
Comments
whitebeard pirate
2024-12-01 06:31:20ls -ld /home/admins
whitebeard pirate
2024-12-01 06:30:30groupadd adminuser
#create the collaborative/shared dir
mkdir -p /home/admins
#give read and write permission to the dir owner
chmod 770 /home/admins
you can also use this cmd: chmod 2770 /home/admins to set the SGID bit and owner and group member permissions
#set the SGID
chmod g+s /home/admins
ubiquituz
2024-11-26 12:25:411
Create the Group adminuser
Run the following command to create the adminuser group if it doesn't already exist:
sudo groupadd adminuser
2
Create the Directory /home/admins
Create the directory /home/admins:
sudo mkdir /home/admins
3
Set Group Ownership
Assign the group adminuser as the group owner of the /home/admins directory:
sudo chown :adminuser /home/admins
4
Set Permissions
Set permissions so that:
Members of the adminuser group can read, write, and access the directory.
sudo chmod 770 /home/admins
This ensures:
rwx (read, write, execute) permissions for the owner and group.
No permissions for others.
5
Enable SGID (Set Group ID)
To ensure that files created within /home/admins automatically inherit the group ownership of adminuser, set the SGID bit on the directory:
sudo chmod g+s /home/admins
This modifies the directory permissions to look like drwxrws---. The s in the group permissions indicates that the SGID bit is active.
Upvoting a comment with a selected answer will also increase the vote count towards that answer by one. So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.
Report Comment
Commenting
You can sign-up / login (it's free).