|
|
Access Control List - ACL in Linux - Linux
|
Views : 668
|
|
Tagged in : Linux
|
|
|
Report This Scrap as Inappropriate We request you to choose the appropriate categroy and subcategory that suits your
objectionable concern about the scrap, So that our team can review and find out whether it violates our Guidelines or the
scrap is not suitable for all viewers.
|
In linux we have a feature called Access Control List which provides us a way to set different file permissions for different users.For example, if want to set rwx for user1 and rw for user2 to the directory called /data, you can do the following steps
First enable ACL by following command:
mount -t ext3 -o acl <device-name> <partition-name>
eg: mount -t ext3 -o acl /dev/sda4 /data ( /dev/sda4 mounted in /data with ACL enabled)
Then set ACL by using the following command:
setfacl -m u user-name) permission) (directory or file)
example:
setfacl -m u:user1:rwx /data
setfacl -m u:user2:rw /data
Now rwx is set for user1 and rw is set for user2 for /data directory
You can test ACL by:
getfacl /data |
|
By - Selva, On - 2008-04-07 |
|
|
|