Skip to content

Instantly share code, notes, and snippets.

@aursu
Created February 2, 2018 11:15
Show Gist options
  • Save aursu/342393d18082566b6f6588c78fd3f693 to your computer and use it in GitHub Desktop.
Save aursu/342393d18082566b6f6588c78fd3f693 to your computer and use it in GitHub Desktop.
effective rights mask in action
[root@localhost ~]# getfacl /var/log/nginx
getfacl: Removing leading '/' from absolute path names
# file: var/log/nginx
# owner: nginx
# group: nginx
user::rwx
user:dev2:r-x #effective:---
user:dev1:r-x #effective:---
group::---
mask::---
other::---
[root@localhost ~]# ls -ld /var/log/nginx
drwx------+ 2 nginx nginx 20480 Feb 2 03:06 /var/log/nginx
[root@localhost ~]# setfacl -m m::rx /var/log/nginx
[root@localhost ~]# getfacl /var/log/nginx
getfacl: Removing leading '/' from absolute path names
# file: var/log/nginx
# owner: nginx
# group: nginx
user::rwx
user:dev2:r-x
user:dev1:r-x
group::---
mask::r-x
other::---
[root@localhost ~]# ls -ld /var/log/nginx
drwxr-x---+ 2 nginx nginx 20480 Feb 2 03:06 /var/log/nginx
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment