To set the permission for any group
To view the permission
To remove individual acl for any user
To remove all the acl added by setfacl
# setfacl -b /path/to/directory
To remove the default acls on any directory
# setfacl -d /path/to/directory
Examples:
To add an acl for user deepak with read and execute permission on mydata directory
# setfacl -m u:deepak:r-x /mydata
To add an acl for group admin on any directories
# setfacl -m g:admin:rwx /mydata
# setfacl -Rm -u:deepak:r-x /mydata/
To view the acl entries on mydata
# getfacl /mydata
# file: new
# owner: root
# group: root
user:deepak:r-x
group:admin:rwx
group::r-x
mask::r-x
other::r-x
So here you can see '+' sign is added at the last of permission section of the directory which means that acl is active on that directory.
To remove a particular acl from the directory
# setfacl -x u:deepak /mydata
To remove all the acls from any directories
# setfacl -b /mydata
For further examples you can go to man page for setfacl

0 comments:
Post a Comment