Welcome to ExamTopics
ExamTopics Logo
- Expert Verified, Online, Free.

Unlimited Access

Get Unlimited Contributor Access to the all ExamTopics Exams!
Take advantage of PDF Files for 1000+ Exams along with community discussions and pass IT Certification Exams Easily.

Exam EX200 topic 1 question 84 discussion

Actual exam question from RedHat's EX200
Question #: 84
Topic #: 1
[All EX200 Questions]

SIMULATION -
According the following requirements to create a local directory /common/admin.
This directory has admin group.
This directory has read, write and execute permissions for all admin group members.
Other groups and users don't have any permissions.
All the documents or directories created in the/common/admin are automatically inherit the admin group.

Show Suggested Answer Hide Answer
Suggested Answer: See explanation below.
mkdir -p /common/admin
chgrp admin /common/admin
chmod 2770 /common/admin

Comments

Chosen Answer:
This is a voting comment (?) , you can switch to a simple comment.
Switch to a voting comment New
STFN2019
Highly Voted 2 years, 7 months ago
Full solution: mkdir -p /common/admin groupadd admin chown :admin -R /common chmod 775 -R /common chmod g+s -R /common touch testfile (to verify the latter requirement)
upvoted 5 times
sirasdf
1 year, 9 months ago
-R is not required. SGID will apply future group owner
upvoted 1 times
...
Xtamata
2 years, 6 months ago
you forget that 'Other groups and users don't have permission". instead of chmod 775 /common, the correct command is chmod 770 /common.
upvoted 7 times
...
...
PENNSHARK
Most Recent 3 months, 2 weeks ago
mkdir -p /common/admin groupadd admin chown :admin /common/admins chmod 770 /common/admins chmod g+s /common/admins
upvoted 1 times
ktd971
1 month, 2 weeks ago
770 mean that the Other groups and users don't have permission ?
upvoted 1 times
...
...
sovafal192
1 year, 7 months ago
####* prepare, if not present mkdir -p /common/admin groupadd admin ####* owner group chown .admin /common/admin/ ####* remove not needed permissions chmod o-rwx /common/admin/ chmod u-rwx /common/admin/ ####* add group permissions and sticky bit chmod g+rwxs /common/admin/
upvoted 1 times
...
kitkat
1 year, 9 months ago
groupadd admin mkdir -p /common/admin chgrp -R admin /common/admin setfacl -R -m u::---,g::---,g:admin:rwx /common/admin ---this makes sure other groups has no access setfacl -R -dm o::- /common/admin ---this makes sure others do not have access to folders chmod -R g+s /common/admin ---turn sticky bit on for the group
upvoted 1 times
kitkat
1 year, 9 months ago
groupadd admin mkdir -p /common/admin chgrp -R admin /common/admin setfacl -R -m u::---,g::---,g:admin:rwx /common/admin ---this makes sure other groups has no access setfacl -R -dm o::- /common/admin ---this makes sure others do not have access to folders chmod -R g+s /common/admin ---turn sticky bit on for the group
upvoted 1 times
...
...
14_aman
1 year, 10 months ago
I THINK IN THIS QUESTION APPLY FOR ACL FOR ADMIN GROUP # setfacl -m g:admin:rwx /common/admin change permission for other group and other user #chmod 700 /common/admin apply guid #chmod g+s /common/admin please reply
upvoted 1 times
...
Mbuthia
2 years, 1 month ago
groupadd admin mkdir -p /common/admin chgrp -R admin /common/admin setfacl -R -m u::---,g::---,g:admin:rwX /common/admin chmod -R g+s /common/admin
upvoted 2 times
kitkat
1 year, 9 months ago
when you already used rwX when why do you need g+s in the next command? Didn't rwX already set the sticky bit for group above?
upvoted 1 times
kitkat
1 year, 9 months ago
i think capital X was and error which would make sense why g+s was used
upvoted 1 times
...
...
...
cloudyhr
2 years, 3 months ago
#Create Directory mkdir -p /common/admin -p, --parents no error if existing, make parent directories as needed #Create Group groupadd admin #change group for /common/admin chown root:admin /common/admin or chgrp admin /common/admin #give group full permission and other no permissions chmod 770 /common/admin
upvoted 4 times
cloudyhr
2 years, 3 months ago
#finally setGUID chmod 2770/common/admin
upvoted 5 times
...
...
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.

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.

SaveCancel
Loading ...