Using ACL permissions in Ubuntu

List ACL’s for a given directory

getfacl /var/www
# file: www
# owner: root
# group: root
user::rwx
group::r-x
other::r-x

You might need to install ACL (apt install acl).

Add a group to an ACL

Use setfacl to add a group to the ACL

setfacl -m g:family:rwx /var/www/

This leads your check on ACL like this:

 # file: www
 # owner: root
 # group: root
 user::rwx
 group::r-x
 group:family:rwx
 mask::rwx
 other::r-x

Removing an ACL entry:

setfacl -x g:family /var/www

Granting an additional user read-write access

setfacl -m u:jhemp:rw /var/www

More information: https://help.ubuntu.com/community/FilePermissionsACLs

Leave a Reply