0

I'm going through Sander Van Vugt course for RHCSA, and got stuck on ACL Lab assignment. Consider the following:

I have two following groups:

profs:x:1005:anna,audrey
students:x:1006:linda,lisa

I have directory /data/ with following subdirs:

[root@vudex ~]# ls -l /data/
total 0
drwxrws--T+ 2 anna profs    22 Feb 25 02:43 profs
drwxrws--T. 2 anna students  6 Feb 25 03:35 students

My goal is to make members of group "profs" read the content of /data/students directory. So, there is no ACL for /data/students at the moment, nor there are files.

[root@vudex ~]# getfacl /data/students/
getfacl: Removing leading '/' from absolute path names
# file: data/students/
# owner: anna
# group: students
# flags: -st
user::rwx
group::rwx
other::---

And

[root@vudex ~]# ls -l /data/students/
total 0

But when I set default ACL for the directory, user Audrey still cannot read /data/students content, thou being the member of "profs" group

[root@vudex ~]# setfacl -m d:g:profs:rx /data/students
[root@vudex ~]# getfacl /data/students
getfacl: Removing leading '/' from absolute path names
# file: data/students
# owner: anna
# group: students
# flags: -st
user::rwx
group::rwx
other::---
default:user::rwx
default:group::rwx
default:group:profs:r-x
default:mask::rwx
default:other::---

[root@vudex ~]# su - audrey 
[audrey@vudex ~]$ ls -l /data/students/
ls: cannot open directory '/data/students/': Permission denied
[audrey@vudex ~]$ 

But when I do setfacl command with -R flag, it works:

[root@vudex ~]# setfacl -Rm g:profs:rx /data/students
[root@vudex ~]# su - audrey
[audrey@vudex ~]$ ls -l /data/students/
total 0

What am I missing here? Shouldn't default ACL be the choice, if directory does not contain any files or subdirectories?

1 Answer 1

0

did you have an execute permission on the /data/ directory prior that? I think it is an issue with the /data directory rather than the students

getfacl /data

3
  • [root@vudex ~]# getfacl /data/ getfacl: Removing leading '/' from absolute path names # file: data/ # owner: root # group: root user::rwx group::r-x other::r-x p.s. for some reason markdown isn't working for me
    – vudex
    Feb 24, 2020 at 14:35
  • execute permission is in place for /data
    – vudex
    Feb 24, 2020 at 14:39
  • I had the same problem, somehow default permissions does not work. With -R (--recursive) it works. Nov 6, 2021 at 23:00

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .