Display ACL entries for a file by using the getfacl command.
$ getfacl [-a | -d] filename1 ... |
-a |
Displays the file name, owner, group, and ACL entries for the specified file or directory. |
-d |
Displays the file name, owner, group, and default ACL entries for the specified directory. |
filename ... |
File or directory for which to display the ACL entries. |
If you specify multiple file names on the command line, the ACL entries are separated by a blank line.
The following example shows all the ACL entries for the ch1.doc file. The #effective: note beside the user and group entries indicates what the permissions are after being modified by the ACL mask.
$ getfacl ch1.doc # file: ch1.doc # owner: nathan # group: sysadmin user::rw- user:george:rw- #effective:rw- group::r-- #effective:r-- mask:rw- other:--- |
The following example shows the default ACL entries for the book directory.
$ getfacl -d book # file: book # owner: nathan # group: sysadmin default:user::rw- default:user:george:r-- default:group::rw- default:mask:rw- default:other:r-- |