Access Control Lists ( ACL's) !!!
There are 2 types of ACL's:
1) Access ACL - for specific files and directories.
2) Default ACL - can only be associated with a directory. If a file within the directory does not have an access ACL, it uses the rules of the defaul ACL for the directory.
=>Default ACL's are optional.
* ACL's can be configured
1) Per User 2) Per Group
3)Via the effective right mask 4) for users not in the user group for the file
=> ACL package is required.
#vi /etc/fstab
LABEL=/share /share ext3 acl 1 2
or,
#mount -t ext3 -o acl
* To view existing ACL's for a file
#getfacl
* To set or modify existing ACLs, use the following
#setfacl -m
-> include --test to show the results of the command but not change the ACL and -R to apply the rules recursively.
-> Replace with one or more space seperated file or directory names
* for an individual user :-
u::
* for a specific user group :-
g::
* for users not in the user group associated with the file :-
o:
* Via the effective right mask
m:
Example: To give read and write permission to user rohan
#setfacl -m u:rohan:rw /project/somefile
* Removing ACLs
#setfacl -x
#setfacl -x u:500 /project/somefile
* To remove all ACLs for a file or directory with following:-
#setfacl --remove-all
* To remove all default ACLs from a directory
#setfacl --remove-default
* Setting Default ACLs :- To set a default ACL, add d: before the rule and specify a directory instead of a filename.
#setfacl -m d:o:rx /share
=> mv command preserves the ACLs associated with files.
tar, dump and cp commands do not backup ACLs.
To backup or archieve files with ACLs, use the star utility.
* Setting Default ACLs :- To set a default ACL, add d: before the rule and specify a directory instead of a filename.
#setfacl -m d:o:rx /share
=> mv command preserves the ACLs associated with files.
tar, dump and cp commands do not backup ACLs.
To backup or archieve files with ACLs, use the star utility.
Tags: ACls access control lists default RHCE RHEL security setfacl getfacl commands
Thanks for reading this post. Hope you liked it. Please input your valuable comments. ~ ROHAN RAWAT
Share this blog with your friends...

0 comments:
Post a Comment