ACL in Linux

This is a quick howto setup acl on Linux.

Sometimes we run into issue when we only wish to give certain user certain sets of permission and deny the rest. Simple rwx permission are not suffice in such situation therefore we use acls.

Setup ACL:
setfacl -R -m u:salman:rwx secret/
The above will set acl on directroy secret for user salman with read, write and execute permission recursively.

To View ACL:
getface secret
# file: secret/
# owner: apache
# group: apache
user::rwx
user:salman:rwx
group::rwx
mask::rwx
other::r-x
So we can clearly see that although the owner is apache, user salman have full permissions as well.

Thanks for Reading.
Join our FaceBook Group LHZProject “Linux Zero To Hero”
YouTube: www.youtube.com/linuxking