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
10 months agoGerry
10 months agoLorean
11 months agoCarlene
11 months agoSina
11 months agoLorrie
11 months agoIola
11 months agoKimbery
11 months agoErnie
11 months agoSalome
11 months agoDelsie
11 months ago