exam questions

Exam EX200 All Questions

View all questions & answers for the EX200 exam

Exam EX200 topic 1 question 3 discussion

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

SIMULATION -
Create a catalog under /home named admins. Its respective group is requested to be the admin group. The group users could read and write, while other users are not allowed to access it. The files created by users from the same group should also be the admin group.

Show Suggested Answer Hide Answer
Suggested Answer: See explanation below.
# cd /home/
# mkdir admins /
# chown .admin admins/
# chmod 770 admins/
# chmod g+s admins/

Comments

Chosen Answer:
This is a voting comment (?). It is better to Upvote an existing comment if you don't have anything to add.
Switch to a voting comment New
Moram
Highly Voted 4 years, 2 months ago
If the group should only have read and write shouldn't the command be: chmod 760 /admins
upvoted 13 times
kitkat
2 years, 6 months ago
Permissions on the folder works different to that of files. Permissions needed are 2770 with 2760 users member of admin group will not be able to enter the folder.
upvoted 2 times
Mari685
2 years, 6 months ago
Hi can you give me some details about redhat
upvoted 1 times
...
...
...
Joeytechn9t
Highly Voted 3 years, 6 months ago
#mkdir /home/admins #groupadd admin #chown root:admin /admins #chmod 770 /admins #chmod g+s
upvoted 12 times
...
M_May87
Most Recent 6 months ago
# Create the directory mkdir /home/admins # Change the owner of the directory to root sudo chown root: /home/admins # Change the group of the directory to admin sudo chgrp admin /home/admins # Set the permissions so that the owner and the group can read and write, # but others cannot access it sudo chmod 770 /home/admins # Set the group ID on the directory so that files created within it # inherit the group of the directory (admin) rather than the group of the user that created the file sudo chmod g+s /home/admins
upvoted 2 times
...
Rahul95
1 year, 6 months ago
#mkdir -p /home/admins #chgrp admin /home/admins #chmod 770 /home/admins - 7 is for max permission for dir and 6 is for files #chmod g+s /home/admins #su - harry #touch /home/admins/testfile #ls-ltr /home/admins/ - to verify
upvoted 5 times
...
techzideas
1 year, 10 months ago
mkdir -p /home/admins chown -R :admin /home/admins chmod 2070 /home/admins touch /home/admins/office.txt ll /home/admins Please Give me your views on this...
upvoted 1 times
radwan_maazon
1 year, 9 months ago
/home actualy exist so that you don't neet put -p
upvoted 1 times
...
...
syed2020
2 years, 5 months ago
Without granting x permissions, group users will not be able to access the folder so it should be chmod 770 /home/admins
upvoted 1 times
...
AbidBajwa
3 years, 2 months ago
mkdir admins groupadd admin chown :admin /home/admins chmod g+rw /home/admins chmod o-rwx /home/admins chmod g+s /homeadmins
upvoted 3 times
cloudyhr
2 years, 11 months ago
Did implemented practically and 770 is the correct answer chmod 2770 /home/admin same as above 3 chmod commands
upvoted 4 times
stoobie
2 years, 9 months ago
@cloudyhr Why do you have 2770 instead of just 770? And why is g+s necessary?
upvoted 1 times
stoobie
2 years, 9 months ago
I figured out the answer to my second question about g+s. The "s" (special permissions) is necessary so that files _created_ by users from the `admin` group are also _owned_ by the `admin` group.
upvoted 1 times
kitkat
2 years, 3 months ago
your first question's answer is same. 2 is equivalent of g+s
upvoted 1 times
...
...
...
...
...
sugisho
3 years, 4 months ago
which is correct permission /home/admin 760 or 770 ?
upvoted 2 times
AluBhorta
3 years ago
2770 to be precise. it's because without exec permission, even group users won't be able to enter the dir (i.e. cd requires rx permission).
upvoted 2 times
Mari685
2 years, 6 months ago
can you help me in redhat need some details about it if possible dm me on instagram lvukhan123
upvoted 1 times
...
...
...
RHEL
3 years, 9 months ago
The right answer is chmod 770 because you need to have execution permission on the directory to have access to its content, so you can perform write and read process.
upvoted 4 times
golem1987
3 years, 7 months ago
2770 should be to allow also inheritance for group permissions
upvoted 3 times
...
...
adolfoale
3 years, 10 months ago
For all of the above to work, the user must have the admin group as an additional group. Do the test.
upvoted 3 times
...
RedQuasar
3 years, 11 months ago
mkdir /home/admins chown :admin /home/admins chmod u=rw,o=--- /home/admins chmod g+s /home/admins
upvoted 3 times
...
Nhan
4 years, 2 months ago
2=Write 4 = read therefore r+w=6, Moran has the correct answer for setting chmod
upvoted 1 times
Darion81
4 years, 1 month ago
Depends. For directories - r - list files, w - add/del files, x - cd to that directory If yser should be able to enter it this dir should have x
upvoted 7 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 ...