exam questions

Exam EX200 All Questions

View all questions & answers for the EX200 exam

Exam EX200 topic 1 question 28 discussion

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

SIMULATION -
Configure /var/tmp/fstab Permission.
Copy the file /etc/fstab to /var/tmp/fstab. Configure var/tmp/fstab permissions as the following:
Owner of the file /var/tmp/fstab is Root, belongs to group root
File /var/tmp/fstab cannot be executed by any user
User natasha can read and write /var/tmp/fstab
User harry cannot read and write /var/tmp/fstab
All other users (present and future) can read var/tmp/fstab.

Show Suggested Answer Hide Answer
Suggested Answer: See explanation below.
cp /etc/fstab /var/tmp/
/var/tmp/fstab view the owner setfacl -m u:natasha:rw- /var/tmp/fstab setfacl -m u:haryy:--- /var/tmp/fstab
Use getfacl /var/tmp/fstab to view permissions

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
jahute27
Highly Voted 3 years, 2 months ago
cp /etc/fstab /var/tmp/fstab chown root:root /var/tmp/fstab chmod 770 /var/tmp/fstab setfacl -m u:natasha:rw- /var/tmp/fstab setfacl -m u:harry:rw- /var/tmp/fstab setfacl -m o::r--,m:r /var/tmp/fstab getfacl /var/tmp/fstab
upvoted 7 times
kitkat
2 years, 5 months ago
harry is not suppose to have rw permissions as per the question. setfacl -m u:harry:--- /var/tmp/fstab
upvoted 4 times
...
midhun_das
3 years ago
770 or 660 ?
upvoted 4 times
maxam20
10 months ago
chmod 664 /var/tmp/fstab
upvoted 2 times
...
14_aman
2 years, 6 months ago
question says all other users can read [r=4 ]
upvoted 1 times
...
...
...
mattd81
Highly Voted 2 years, 7 months ago
Wouldn't it be chmod 664 /var/tmp/fstab It says all other users should have read access but non should be able to execute??
upvoted 6 times
riddie78
1 year, 2 months ago
can not be executed by any user... execute is 1 so 1 is taken from every ugo natasha can read and write ...setfacl -m u:user:rw- /var/tmp/fstab harry cannot read and write ...setacl -m u:user:--- /var/tmp/fstab all other users can write (444)... I dont think this means other as in users,groups,others so setfacl 000 for harry ... if they can write they can read so 666??? idk
upvoted 1 times
riddie78
1 year, 2 months ago
sorry for confusion, and write is 222 for write only so read and write is 666
upvoted 1 times
...
...
...
strTe
Most Recent 8 months ago
The file is a member of the root group and belongs to root. So root(rw) have rw_r_ _ r _ _ It is not executable by anyone. natasha has read and write access. harry has no read or write access. All other users can read the file. cp /etc/fstab /var/tmp/fstab chown root:root /var/tmp/fstab (not requireed) chmod 644 /var/tmp/fstab(rw_r _ _r_ _) setfacl -m u:natasha:rw /var/tmp/fstab setfacl -m u:harry:--- /var/tmp/fstab getfacl /var/tmp/fstab
upvoted 2 times
...
kenkct
2 years, 9 months ago
sudo su cp /etc/fstab /var/tmp/fstab chown root:root /var/tmp/fstab chmod oug-x /var/tmp/fstab setfacl -m u:natasha:rw /var/tmp/fstab setfacl -m u:harry:-- /var/tmp/fstab chmod o+r /var/tmp/fstab getfacl /var/tmp/fstab (to verify)
upvoted 6 times
xXxM__JxXx
2 years, 8 months ago
i used chmod o-w to make sure that others has no write access.
upvoted 2 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 ...