Linux Tricks and Techniques

For Linux Experts

Use the website for easy leaning of Linux

Friday, 3 June 2016

Access Control List in Linux

ACL ( Access Control List)


In Linux when we add a new user they do not get the permission for all the file a and directories to execute in all manners because this is the authority of a root user and only a root or super user can give access to other user to perform different operations. To give them permission on any file or directory Linix gives us flexibility to do so. These authentication process to a normal user is known as ACL in Linux and  Solaris. Some simple commands to apply these controls to a user are as follows:







Let us suppose we have a file named test and the name of the user is John, to give the permission to john on test file we need to execute the comm

#setfacl -m u:john:6 /test

Now the user john is able to access the file test. AFter applying acl it shows + sign for the file. To check type a command 

#getfacl /test

Still it will shoe th read permission only because the mask value is still read. To change the mask value 

#setfacl -m m:6 /test

Add Permission to a group

# setfacl -m g:groupname:permission /filename
#getfacl /filename

To remove the ACL from file 

#setfacl -b /filename


Thanks

No comments:
Write comments