• 1-888-289-2246
  • 24x7x365 Presence

Restricting a File or Directory using the Access Control List


ACL is the access control list for a specific file or directory. By default an ACL is associated with a directory and the files inside that directory inherit the ACL of the directory, if the files don’t have any ACL set explicitly. With the help of ACLs we can control the access to files and directories.

To set the ACL, we can use the command below:-

setfacl -m

For example:-

setfacl -m u:sachin:rw /home/somefile.txt

To remove the ACL from a file or directory, we can use the command below:-

setfacl -x u:sachin /home/somefile

]]>


Leave a Reply

Your email address will not be published. Required fields are marked *