Table of Contents
getfacl - get file access control lists
getfacl [-adceEsRY5Pvh]
file ...
getfacl [-adceEsRY5Pvh] -
For each file, getfacl displays
the file name, owner, the group, and the Access Control List (ACL). If a
directory has a default ACL, getfacl also displays the default ACL. Files
cannot have default ACLs.
If getfacl is used on a file system that does
not support ACLs, getfacl displays the access permissions defined by the
traditional file permission bits.
The output format of getfacl is as follows:
1: # file: somedir/
2: # owner: lisa
3: # group: staff
4: user::rwx
5: user:joe:rwx #effective:r-x
6: group::rwx #effective:r-x
7: group:cool:r-x
8: mask:r-x
9: other:r-x
10: default:user::rwx
11: default:user:joe:rwx #effective:r-x
12: default:group::r-x
13: default:mask:r-x
14: default:other:---
Lines 4, 6 and 9 correspond to the user, group and other fields of the
traditional file permission bits. These three are called the base entries.
Lines 5 and 7 are named user and named group entries. Line 8 is the effective
rights mask. This entry limits the effective rights granted to all groups
and to named users. (The file owner and others permissions are not affected
by the effective rights mask.) Lines 10--14 display the default ACL associated
with this directory. Directories may, but need not have a default ACL. Files
never have a default ACL. Default ACL entries are governed by the same rules
as ACL entries.
The default bahavior for getfacl is to display both the
ACL and the default ACL, and to include an effective rights comment for
lines where the rights of the entry differ from the effective rights.
The
ACL listings of multiple files are separated by blank lines. The output
of getfacl can be used as input to setfacl.
- -a
- Display the file access
control list.
- -d
- Display the default access control list.
- -c
- Do not display
the comment header (the first three lines of each file's output).
- -e
- Print
all effective rights comments, even if identical to the ACL entry's rights.
- -E
- Do not print effective rights comments.
- -s
- Skip files that only have the
base ACL entries (owner, group, others).
- -R
- List the ACLs of all files and
directories recursively.
- -Y
- Follow symbolic links. The usual behavior is to
skip symbolic links in subdirectories.
- -5
- Print output in post-order. This
option exists mainly for compatibility reasons with setfacl.
- -P
- Do not strip
leading slash characters (`/'). The default behavior is to strip leading slashes,
so that an ACL listing can be easily applied to a different directory sub-tree
(Yes, setfacl can do this).
- -v
- Print the version of getfacl and exit.
- -h
- Print
help explaining the command line options.
- --
- End of command line options. All
remaining parameters are interpreted as file names, even if they start
with a dash character.
- -
- If the file name parameter is a single dash character,
getfacl reads a list of files from standard input.
If
the environment variable POSIXLY_CORRECT is defined, the default behavior
of getfacl changes in the following way: Unless otherwise specified, only
the ACL is printed. The default ACL is only printed if the -d option is given.
Andreas Gruenbacher, <a.gruenbacher@computer.org>.
Please send your bug
reports, suggested features and comments to the above address.
setfacl(1),
acl(2), acl(5)
Table of Contents