What is Access Control List and its types ?
It is a special kind of permission we are giving to the file system.
Think of the scenario when a user is not a member of a group created by you but still you want to give some read or write access, how can you do it without making the user a member of group, here ACL enters in the picture.
- setfacl are used for setting up ACL
- getfacl are used for showing ACL
–> There are two type of ACL :-
→ The default acl is used to set access control list on a specific directory
→ The access ACL is used to set permissions on any file or directory.
- setfacl -m “d:o:perms” file_of_ name
To add permissions for a group
- setfacl -m “g:group:permissions” /path_of_file
To add permission for user
- setfacl -m “u:user:permissions” /path_of_file
To remove a specific entry
- setfacl -x “g:group” /path_of_file
To copy the ACL rule from one file to other
- getfacl file> file
- setfacl -M file_to_file
To remove all entries
- setfacl -b path_of_file