Setfacl, issue for me in (Linux Access Control List)

Hi Community, can someone comment on strange behaviour, please review the listing below. I found similar problems while reviewing tasks.

[root@stapp01 ~]# getfacl /etc/sysctl.conf
getfacl: Removing leading ‘/’ from absolute path names

file: etc/sysctl.conf

owner: root

group: root

user::rw-
group::r–
other::r–

[root@stapp01 ~]# id ammar
uid=1002(ammar) gid=1002(ammar) groups=1002(ammar)
[root@stapp01 ~]# id jerome
uid=1003(jerome) gid=1003(jerome) groups=1003(jerome)
[root@stapp01 ~]# setfacl -m u:ammar:-,jerome:r /etc/sysctl.conf
setfacl: /etc/sysctl.conf: Operation not supported
[root@stapp01 ~]# getfacl /etc/sysctl.conf
getfacl: Removing leading ‘/’ from absolute path names

file: etc/sysctl.conf

owner: root

group: root

user::rw-
group::r–
other::r–

[root@stapp01 ~]#

I think you shoud run this:
setfacl -m u:ammar:-,u:jerome:r /etc/sysctl.conf
In second user you forgot specify the ‘u:’

1 Like

Thank you, its working