08 04 2021
-rw-r--r--. 1 student student 16 Apr 8 11:01 chfile1
user group
student rw-
student r--
other r--
user1 rw-
other rw- user1 rw- but also user2 rw- xxxxxxx
chown --- student - user1
-rw-r--r--. 1 user1 student 16 Apr 8 11:01 chfile1 xxxxx
add user1 to student group change rw- xxxx
$ ll chfile1
-rw-r--r--. 1 student student 16 Apr 8 11:01 chfile1
$ getfacl chfile1
file: chfile1
owner: student
group: student
user::rw-
group::r--
other::r--
$ setfacl -m u:user1:rw chfile1
$ getfacl chfile1
file: chfile1
owner: student
group: student
user::rw-
user:user1:rw-
group::r--
mask::rw-
other::r--
$ ll chfile1
-rw-rw-r--+ 1 student student 16 Apr 8 11:01 chfile1
$ setfacl -m g:group1:rw chfile1
$ getfacl chfile1
file: chfile1
owner: student
group: student
user::rw-
user:user1:rw-
group::r--
group:group1:rw-
mask::rw-
other::r--
$ ll chfile1
-rw-rw-r--+ 1 student student 16 Apr 8 11:01 chfile1
setfacl -x u:user1 chfile1
setfacl -x g:group1 chfile1
getfacl chfile1