Thursday, August 2, 2012

Acl (Access Control List)


Acl (Access Control List)

# vi /etc/fstab

LABEL=/                   /                       ext3                defaults,acl             1  1

:wq (save and exit)

# mount -o remount,rw /

# mkdir test

# cd test

# cat >acltest.txt

Ctrl + D

Login with other user and open the file.

# getfacl /root/test/acltest.txt  (Command will show the permission on the file.)

# setfacl -m u:user1:r-x /root/test/acltest.txt (Will set the permission on the file.)

# getfacl /root/test/acltest.txt

Login with user1 and try to open the file.

# setfacl -x u:user1 /root/test/acltest.txt  (command will remove the acl permission from the file).


No comments:

Post a Comment