Last active
          April 18, 2025 12:36 
        
      - 
      
- 
        Save carl-parrish/fd6744c1facbb95fb6e6fa3eb3226c3d to your computer and use it in GitHub Desktop. 
Revisions
- 
        carl-parrish revised this gist Apr 18, 2025 . 1 changed file with 2 additions and 2 deletions.There are no files selected for viewingThis file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -110,9 +110,9 @@ other::r-- ``` # Related commands [chmod](https://www.computerhope.com/unix/uchmod.htm) — Change the permissions of files or directories. [ls](https://www.computerhope.com/unix/uls.htm) — List the contents of a directory or directories. [setfacl](https://www.computerhope.com/unix/usetfacl.htm) — Modify the access control list of a file or files. 
- 
        carl-parrish revised this gist Apr 18, 2025 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewingThis file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -80,7 +80,7 @@ getfacl [-dRLPvh] - | `-` | If the file name parameter is a single dash character, getfacl reads a list of files from standard input. | # Environment variables If the [environment variable](https://www.computerhope.com/jargon/e/envivari.htm) POSIXLY_CORRECT is defined, the default behavior of getfacl changes in the following ways: Unless otherwise specified, only the ACL is printed. The default ACL is only printed if the -d option is given. If no command line parameter is given, getfacl behaves as if it was invoked as "getfacl -". # Examples ``` 
- 
        carl-parrish revised this gist Apr 18, 2025 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewingThis file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -44,7 +44,7 @@ If output is to a [terminal](https://www.computerhope.com/jargon/t/terminal.htm) The ACL listings of multiple files are separated by blank lines. The output of getfacl can also be used as input to [setfacl](https://www.computerhope.com/unix/usetfacl.htm). # Permissions [Processes](https://www.computerhope.com/jargon/p/process.htm) with search access to a file (i.e., processes with read access to the containing directory of a file) are also granted read access to the file's ACLs. This is analogous to the permissions required for accessing the file mode. # Syntax ```bash 
- 
        carl-parrish revised this gist Apr 18, 2025 . 1 changed file with 3 additions and 3 deletions.There are no files selected for viewingThis file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -39,9 +39,9 @@ Lines 4, 6 and 9 correspond to the user, group and other fields of the file mode The default behavior 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. If output is to a [terminal](https://www.computerhope.com/jargon/t/terminal.htm), the effective rights comment is aligned to column 40. Otherwise, a single [tab character](https://www.computerhope.com/jargon/t/tab-character.htm) separates the ACL entry and the effective rights comment. The ACL listings of multiple files are separated by blank lines. The output of getfacl can also be used as input to [setfacl](https://www.computerhope.com/unix/usetfacl.htm). # Permissions Processes with search access to a file (i.e., processes with read access to the containing directory of a file) are also granted read access to the file's ACLs. This is analogous to the permissions required for accessing the file mode. @@ -114,5 +114,5 @@ chmod — Change the permissions of files or directories. ls — List the contents of a directory or directories. [setfacl](https://www.computerhope.com/unix/usetfacl.htm) — Modify the access control list of a file or files. 
- 
        carl-parrish revised this gist Apr 18, 2025 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewingThis file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -3,7 +3,7 @@ Copied from [Computer Hope](https://www.computerhope.com/unix/ugetfacl.htm "getf # Description For each file, getfacl displays the [file name](https://www.computerhope.com/jargon/f/filename.htm), [owner](https://www.computerhope.com/jargon/o/owner.htm), the [group](https://www.computerhope.com/jargon/g/group.htm), and the ACL (Access Control List). If a directory has a default ACL, getfacl also displays the default ACL. Non-directories cannot have default ACLs. If getfacl is used on a [file system](https://www.computerhope.com/jargon/f/filesyst.htm) that does not support ACLs, getfacl displays the access permissions defined by the traditional file mode [permission](https://www.computerhope.com/jargon/p/permissi.htm) [bits](https://www.computerhope.com/jargon/b/bit.htm). The output format of getfacl is as follows: 
- 
        carl-parrish revised this gist Apr 18, 2025 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewingThis file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,7 +1,7 @@ Copied from [Computer Hope](https://www.computerhope.com/unix/ugetfacl.htm "getfacl") # Description For each file, getfacl displays the [file name](https://www.computerhope.com/jargon/f/filename.htm), [owner](https://www.computerhope.com/jargon/o/owner.htm), the [group](https://www.computerhope.com/jargon/g/group.htm), and the ACL (Access Control List). If a directory has a default ACL, getfacl also displays the default ACL. Non-directories 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 mode permission bits. 
- 
        carl-parrish revised this gist Apr 18, 2025 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewingThis file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,7 +1,7 @@ Copied from [Computer Hope](https://www.computerhope.com/unix/ugetfacl.htm "getfacl") # Description For each file, getfacl displays the [file name](https://www.computerhope.com/jargon/f/filename.htm), owner, the group, and the ACL (Access Control List). If a directory has a default ACL, getfacl also displays the default ACL. Non-directories 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 mode permission bits. 
- 
        carl-parrish revised this gist Apr 18, 2025 . 1 changed file with 2 additions and 0 deletions.There are no files selected for viewingThis file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,3 +1,5 @@ Copied from [Computer Hope](https://www.computerhope.com/unix/ugetfacl.htm "getfacl") # Description For each file, getfacl displays the file name, owner, the group, and the ACL (Access Control List). If a directory has a default ACL, getfacl also displays the default ACL. Non-directories cannot have default ACLs. 
- 
        carl-parrish revised this gist Apr 18, 2025 . 1 changed file with 17 additions and 30 deletions.There are no files selected for viewingThis file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -58,37 +58,24 @@ getfacl [-dRLPvh] - ``` ## Options | Option | Description | | --------------- | ---------------------------------------------------------------------------------------------------------- | | `--access` | Display the file access control list. | | `-d, --default` | Display the default access control list. | | `--omit-header` | Do not display the comment header (the first three lines of each file's output). | | `--all-effective` | Print all effective rights comments, even if identical to the rights defined by the ACL entry. | | `--no-effective` | Do not print effective rights comments. | | `--skip-base` | Skip files that only have the base ACL entries (owner, group, others). | | `-R, --recursive` | List the ACLs of all files and directories recursively. | | `-L, --logical` | "Logical walk" (follow symbolic links). The default behavior is to follow symbolic link arguments, and to skip symbolic links encountered in subdirectories. | | `-P, --physical` | "Physical walk" (skip all symbolic links). This also skips symbolic link arguments. | | `--tabular` | Use an alternative tabular output format. The ACL and the default ACL are displayed side by side. Permissions that are ineffective due to the ACL mask entry are displayed capitalized. The entry tag names for the ACL_USER_OBJ and ACL_GROUP_OBJ entries are also displayed in capital letters, which helps in spotting those entries. | | `--absolute-names` | Do not strip leading slash characters ('/'). The default behavior is to strip leading slash characters. | | `--version` | Print the version of getfacl and exit. | | `--help` | 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. | # Environment variables If the environment variable POSIXLY_CORRECT is defined, the default behavior of getfacl changes in the following ways: Unless otherwise specified, only the ACL is printed. The default ACL is only printed if the -d option is given. If no command line parameter is given, getfacl behaves as if it was invoked as "getfacl -". 
- 
        carl-parrish revised this gist Apr 18, 2025 . 1 changed file with 2 additions and 0 deletions.There are no files selected for viewingThis file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -58,6 +58,8 @@ getfacl [-dRLPvh] - ``` ## Options | Option | Description | | --------------- | -------------------------------------------------------------------------------------------------------- | | --access | Display the file access control list.| | -d, --default | Display the default access control list.| 
- 
        carl-parrish renamed this gist Apr 18, 2025 . 1 changed file with 0 additions and 0 deletions.There are no files selected for viewingFile renamed without changes.
- 
        carl-parrish created this gist Apr 18, 2025 .There are no files selected for viewingThis file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,127 @@ # Description For each file, getfacl displays the file name, owner, the group, and the ACL (Access Control List). If a directory has a default ACL, getfacl also displays the default ACL. Non-directories 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 mode 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 file mode permission bits. These three are called the base ACL 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; all other entries are.) Lines 10 through 14 display the default ACL associated with this directory. Directories may have a default ACL. Regular files never have a default ACL. The default behavior 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. If output is to a terminal, the effective rights comment is aligned to column 40. Otherwise, a single tab character separates the ACL entry and the effective rights comment. The ACL listings of multiple files are separated by blank lines. The output of getfacl can also be used as input to setfacl. # Permissions Processes with search access to a file (i.e., processes with read access to the containing directory of a file) are also granted read access to the file's ACLs. This is analogous to the permissions required for accessing the file mode. # Syntax ```bash getfacl [-dRLPvh] file ... ``` ``` getfacl [-dRLPvh] - ``` ## Options | --access | Display the file access control list.| | -d, --default | Display the default access control list.| |--omit-header | Do not display the comment header (the first three lines of each file's output).| | --all-effective | Print all effective rights comments, even if identical to the rights defined by the ACL entry.| | --no-effective | Do not print effective rights comments. | | --skip-base | Skip files that only have the base ACL entries (owner, group, others).| | -R, --recursive | List the ACLs of all files and directories recursively. | | -L, --logical | "Logical walk" (follow symbolic links). The default behavior is to follow symbolic link arguments, and to skip symbolic links encountered in subdirectories.| |-P, --physical | "Physical walk" (skip all symbolic links). This also skips symbolic link arguments.| | --tabular | Use an alternative tabular output format. The ACL and the default ACL are displayed side by side. Permissions that are ineffective due to the ACL mask entry are displayed capitalized. The entry tag names for the ACL_USER_OBJ and ACL_GROUP_OBJ entries are also displayed in capital letters, which helps in spotting those entries.| | --absolute-names | Do not strip leading slash characters ('/'). The default behavior is to strip leading slash characters.| | --version | Print the version of getfacl and exit. | | --help | 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. | # Environment variables If the environment variable POSIXLY_CORRECT is defined, the default behavior of getfacl changes in the following ways: Unless otherwise specified, only the ACL is printed. The default ACL is only printed if the -d option is given. If no command line parameter is given, getfacl behaves as if it was invoked as "getfacl -". # Examples ``` getfacl myfile.txt ``` Displays the access control list for the file myfile.txt. Output resembles the following: ```bash # file: myfile.txt # owner: computerhope # group: users user::rw- group::r-- other::r-- ``` # Related commands chmod — Change the permissions of files or directories. ls — List the contents of a directory or directories. setfacl — Modify the access control list of a file or files.