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 23 discussion

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

SIMULATION -
Copy /etc/fstab to /var/tmp name admin, the user1 could read, write and modify it, while user2 without any permission.

Show Suggested Answer Hide Answer
Suggested Answer: See explanation below.
# cp /etc/fstab /var/tmp/
# chgrp admin /var/tmp/fstab
# setfacl -m u:user1:rwx /var/tmp/fstab
# setfacl -m u:user2:--- /var/tmp/fstab
# ls -l
-rw-rw-r--+ 1 root admin 685 Nov 10 15:29 /var/tmp/fstab

Comments

Chosen Answer:
This is a voting comment (?) , you can switch to a simple comment.
Switch to a voting comment New
adolfoale
Highly Voted 3 years, 3 months ago
# cp /etc/fstab /var/tmp/ # setfacl -m u:user1:rw- /var/tmp/fstab # setfacl -m u:user2:--- /var/tmp/fstab
upvoted 12 times
safodz
2 years, 6 months ago
to mainte the right I think need use cp with the -r option ?
upvoted 1 times
Testo321
5 months, 2 weeks ago
To mainte owner/group/right it is -p option.
upvoted 1 times
...
...
Gbecker
2 years, 11 months ago
I agree with you. The question never says that you must change owner group.
upvoted 3 times
STFN2019
2 years, 7 months ago
Exactly. Perhaps it says with file named admin but then you never know. Will stick with adolfoale's answer for now.
upvoted 1 times
...
...
...
maxim_sk
Highly Voted 1 year, 9 months ago
# I think that in question is to name the file admin cp /etc/fstab /var/tmp/admin #to check try: cat /var/tmp/admin setfacl -m u:user1:rw-,u:user2:--- /var/tmp/admin #check correct permission with getfacl getfacl /var/tmp/admin
upvoted 6 times
...
14_aman
Most Recent 1 year, 11 months ago
I have many doubts in this question . the question does not say for making owner to admin. and I think question says admin and user1 give r w x permission, after seeing this question.
upvoted 1 times
...
mattd81
2 years ago
Why are the setfacl changes being made to the /var/tmp/fstab folder? Isn't it just asking to change the permissions on /var/tmp?
upvoted 1 times
...
vira5489
2 years, 5 months ago
-- lets assume you do not have any user yet. useradd -M user1 useradd -M user2 cp /etc/fstab /vat/tmp/ setfacl -m u:user1:rw- /var/tmp/fstab setfacl -m u:user2:--- /vat/tmp/fstab
upvoted 2 times
xXxM__JxXx
2 years, 1 month ago
why include do not create home on the user creation? is this required?
upvoted 1 times
...
...
gunwantk
2 years, 6 months ago
Please correct the question statement.
upvoted 4 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 ...