RedHat EX200 Exam - Topic 3 Question 47 Discussion
Part 1 (on Node1 Server)Task 5 [Controlling Access to Files with ACLs]Copy the file /etc/fstab to /var/tmp. Configure the following permissions on /var/tmp/fstab.The file /var/tmp/fstab is owned by root userThe file /var/tmp/fstab is belongs to the root groupThe file /var/tmp/fstab should be executable by anyoneThe user harry is able to read and write on /var/tmp/fstabThe user natasha can neither read or write on /var/tmp/fstabAll other users (Current or future) have the ability to read /var/tmp/fstab
A) Explanation:
*
[root@node1 ~]# cp -p /etc/fstab /var/tmp/
[root@node1 ~]# ls -lrt /etc/fstab
[root@node1 ~]# ls -lrt /var/tmp/fstab
[root@node1 ~]# chmod a+x /var/tmp/fstab
[root@node1 ~]# getfacl /var/tmp/fstab
[root@node1 ~]# setfacl -m u:harry:rw- /var/tmp/fstab
[root@node1 ~]# setfacl -m u:natasha:--- /var/tmp/fstab
[root@node1 ~]# getfacl /var/tmp/fstab
getfacl: Removing leading '/' from absolute path names
# file: var/tmp/fstab
# owner: root
# group: root
user::rwx
user:harry:rw-
user:natasha:---
group::r-x
mask::rwx
other::r-x
*
[root@node1 ~]# su - natasha
[natasha@node1 ~]$ cat /var/tmp/fstab
cat: /var/tmp/fstab: Permission denied
Yolande
8 months agoGerry
8 months agoLorean
9 months agoCarlene
9 months agoSina
9 months agoLorrie
9 months agoIola
9 months agoKimbery
9 months agoErnie
9 months agoSalome
9 months agoDelsie
9 months ago