Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save programeriss/4f6453a5b203316527ab2757616084b4 to your computer and use it in GitHub Desktop.
Save programeriss/4f6453a5b203316527ab2757616084b4 to your computer and use it in GitHub Desktop.
gist file ACL
[aidas ~]# mkdir /opt/testdir
[aidas ~]# getfacl /opt/testdir/
getfacl: Removing leading '/' from absolute path names
# file: opt/testdir/
# owner: root
# group: root
user::rwx
group::r-x
other::r-x
[aidas ~]# setfacl -d -m u:aidas:rwx /opt/testdir/
[aidas ~]# getfacl /opt/testdir/
getfacl: Removing leading '/' from absolute path names
# file: opt/testdir/
# owner: root
# group: root
user::rwx
group::r-x
other::r-x
default:user::rwx
default:user:aidas:rwx
default:group::r-x
default:mask::rwx
default:other::r-x
[aidas ~]# touch /opt/testdir/testfile
[aidas ~]# getfacl /opt/testdir/testfile
getfacl: Removing leading '/' from absolute path names
# file: opt/testdir/testfile
# owner: root
# group: root
user::rw-
user:user:rwx #effective:rw-
group::r-x #effective:r--
mask::rw-
other::r--
[aidas ~]# cd testdir
[aidas ~]# echo "yolo" >> testfile
[aidas ~]# ls -l testfile
-rw-rw-r--+ 1 root root 5 Jun 18 14:26 testfile
[aidas ~]# cat testfile
yolo
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment