Forrest logo
back to the getfacl tool

getfacl:tldr:c8b07

getfacl: Display the file access control list.
$ getfacl ${filename_or_directory}
try on your machine

The getfacl command is used to display the Access Control List (ACL) of a file or directory. ACL is a list of permissions associated with a file or directory that specify which users or groups can access it and what actions they can perform.

The syntax of the getfacl command is as follows:

getfacl ${filename_or_directory}

Here, ${filename_or_directory} represents the path to the file or directory whose ACL you want to view. It can be either an absolute path (e.g., /home/user/file.txt) or a relative path (e.g., file.txt).

When you run the getfacl command with a specific file or directory argument, it will retrieve and display the current ACL configuration for that file or directory. The output will include information about the owner of the file or directory, group ownership, and various permissions granted to different users or groups.

For example, let's say you want to view the ACL of a file named document.txt. You would execute the following command:

getfacl document.txt

The command output will provide a detailed list of permissions assigned to different users or groups for that specific file, including permissions for read, write, execute, and more.

Note that to use the getfacl command, you might need appropriate permissions to access the file or directory.

This explanation was created by an AI. In most cases those are correct. But please always be careful and never run a command you are not sure if it is safe.
back to the getfacl tool