Skip to content

Instantly share code, notes, and snippets.

@pgporada
Created January 20, 2017 20:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save pgporada/935bf59e7bf14d01c36ca3bff8cec2c3 to your computer and use it in GitHub Desktop.
Save pgporada/935bf59e7bf14d01c36ca3bff8cec2c3 to your computer and use it in GitHub Desktop.
Linux ACLs
[root@default-centos-7 ~]# ls -al /var/log/messages
-rw-------. 1 root root 397726 Jan 20 19:19 /var/log/messages
[root@default-centos-7 ~]# getfacl /var/log/messages
getfacl: Removing leading '/' from absolute path names
# file: var/log/messages
# owner: root
# group: root
user::rw-
group::---
other::---
[root@default-centos-7 ~]# setfacl -m "u:logstash:r" /var/log/messages
[root@default-centos-7 ~]# ls -al /var/log/messages
-rw-r-----+ 1 root root 397726 Jan 20 19:19 /var/log/messages
[root@default-centos-7 ~]# getfacl /var/log/messages
getfacl: Removing leading '/' from absolute path names
# file: var/log/messages
# owner: root
# group: root
user::rw-
user:logstash:r--
group::---
mask::r--
other::---
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment