System Administration Guide: Security Services

ProcedureHow to Display ACL Entries for a File

  1. Display ACL entries for a file by using the getfacl command.


    % getfacl [-a | -d] filename ...
    
    -a

    Displays the file name, file owner, file group, and ACL entries for the specified file or directory.

    -d

    Displays the file name, file owner, file group, and the default ACL entries, if they exist, for the specified directory.

    filename ...

    Specifies one or more files or directories, separated by a space.

    If you specify multiple file names on the command line, the ACL entries are displayed with a blank line between each entry.


Example 6–11 Displaying ACL Entries for a File

In the following example, all the ACL entries for the ch1.sgm file are displayed. The #effective: note beside the user and group entries indicates what the permissions are after being modified by the ACL mask.


% getfacl ch1.sgm

# file: ch1.sgm
# owner: stacey
# group: techpubs
user::rw-
user:anusha:r-        #effective:r--
group::rw-            #effective:rw-
mask:rw-
other:---

In the following example, the default ACL entries for the book directory are displayed.


% getfacl -d book

# file: book
# owner: stacey
# group: techpubs
user::rwx
user:anusha:r-x       #effective:r-x
group::rwx            #effective:rwx
mask:rwx
other:---
default:user::rw-
default:user:anusha:r--
default:group::rw-
default:mask:rw-
default:other:---