Monday, September 03, 2007

Get the Access Control List on a File or Directory

The getfacl command is used to obtain the filename, file owner, file group owner, and its Access Control List or ACL. It will display the ACL for a regular file or a directory. Here are some examples of its use.

On a file
# getfacl newcron

# file: newcron
# owner: esoft
# group: staff
user::rw-
group::r-- #effective:r--
mask:r--
other:r--

On a directory
# getfacl MyDir

# file: MyDir
# owner: root
# group: other
user::rwx
group::r-x #effective:r-x
mask:r-x
other:r-x

No comments: