Home » RedHat » EX200 v.2 » Configure the permissions of/var/tmp/fstab
Configure the permissions of/var/tmp/fstab
Copy the file /etc/fstab to /var/tmp/fstab. Configure the permissions of/var/tmp/fstab so that:
the file /var/tmp/fstab is owned by the root user.
the file /var/tmp/fstab belongs to the group root.
the file /var/tmp/fstab should not be executable by anyone.
the user natasha is able to read and write /var/tmp/fstab.
the user harry can neither write nor read /var/tmp/fstab.
all other users (current or future) have the ability to read /var/tmp/fstab.
A. See explanation below.
Correct Answer: A
Explanation/Reference:
Explanation:
• cp -a /etc/fstab /var/tmp
• cd /var/tmp
• Is -I
• getfacl /var/tmp/fstab
• chmod ugo-x /var/tmp/fstab
[ No need to do this, there won’t be execute permission for the file by default]
# setfacl -m u:natasha:rw /var/tmp/fstab # setfacl -m u:harry:0 /var/tmp/fstab(zero)
[Read permission will be there for all the users, by default. Check it using Is -I /var/tmp/fstab] Verify by [ Is -la /var/tmp/fstab]
Download Printable PDF. VALID exam to help you PASS.
|
|
file owner already root so do not execute the “chown root fstab” and “chgrp root fstab”
setfacl -m u:natasha:rwx /var/tmp/fstab
setfacl -m u:harry:— /var/tmp/fstab
chmod 774 /var/tmp/fstab
cp /etc/fstab /var/tmp
cd /var/tmp
chown root fstab
chgrp root fstab
chmod a-x fstab
setfacl -m u:natasha:rw fstab
setfacl -m u:harry:— fstab
chmod o+r fstab