CORRECT TEXT Copy /etc/fstab to /var/tmp name admin, th…

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

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

A.
# cp /etc/fstab /var/tmp/

B.
# chgrp admin /var/tmp/fstab

C.
# setfacl -m u:user1:rwx /var/tmp/fstab

D.
-rw-rw-r–+ 1 root admin 685 Nov 10 15:29 /var/tmp/fstab

Explanation:
# 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



Leave a Reply 0

Your email address will not be published. Required fields are marked *