Friday, April 30, 2010

ACL Permission on Unix | Howto setacl and setfacl

Tech Blog - What is ACL or Access Control List on Unix - Access Control Lists extend the standard Unix permission model. This feature will allow administrator more flexible control over permissions. most modern Unix file system support ACL, below are some basic command for adding, modifying, querying ACL on Linux, Solaris, HP-UX and AIX.




Linux and Solaris ACL command

Adding modifying users or group to ACL
$ setfacl -m u:montoya:rwx filename

Viewing ACL of a file
$ getfacl filename

HP-UX ACL command

Adding modifying users or group to ACL
$ setacl -m user:brucewayne:rwx filename

Viewing ACL of a file
$ getacl filename

AIX ACL command

Adding modifying users or group to ACL

Before doing acledit on AIX you must set the editor first using the command
$ export EDITOR=/usr/bin/vi
Then
$ acledit filename

Then you should see something like the one below, changed disable to enable to enable the extended permission if it is disabled.
attributes: SUID
base permissions:
owner(root): rw-
group(root): r-x
others: ---
extended permissions:
enabled
permit r-- u:oracle
permit rw- u:robin
deny r-x u:catwoman
deny rwx g:intergang

Viewing ACL of a file

$ getacl filename

Hope this help!




No comments:

For suggestion and concerns E-mail