getfacl

Linux · Files · reference only

What it does

Shows the access control lists (ACLs) of files and directories: extra permissions for specific users and groups.

Syntax

getfacl [opciones] fichero...

Options and parameters

  • -a

    Shows only the access ACL.

  • -d

    Shows only a directory's default ACL.

  • -R

    Walks directories recursively.

  • -n

    Shows numeric UID and GID instead of names.

  • -t

    Uses a tabular format.

  • -p

    Does not strip the leading slash from absolute paths.

Usage examples

  • getfacl informe.txt

    Shows owner, group and the ACL entries of the file.

  • getfacl -R proyecto/

    Shows the ACLs of the whole project tree.

  • getfacl -d proyecto

    Shows the ACL that new files in the directory will inherit.

  • getfacl a.txt | setfacl --set-file=- b.txt

    Copies the ACL of a.txt to b.txt.

Notes and common mistakes

  • A + at the end of the permissions in ls -l means the file has an ACL.

Related commands