File: getfacl.1

package info (click to toggle)
acl 2.2.53-4
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, buster, experimental, sid
  • size: 3,168 kB
  • sloc: ansic: 5,865; sh: 5,170; perl: 279; makefile: 95; sed: 16
file content (172 lines) | stat: -rw-r--r-- 6,351 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
.\" Access Control Lists manual pages
.\"
.\" (C) 2000 Andreas Gruenbacher, <a.gruenbacher@bestbits.at>
.\"
.\" This is free documentation; you can redistribute it and/or
.\" modify it under the terms of the GNU General Public License as
.\" published by the Free Software Foundation; either version 2 of
.\" the License, or (at your option) any later version.
.\"
.\" The GNU General Public License's references to "object code"
.\" and "executables" are to be interpreted as the output of any
.\" document formatting or typesetting system, including
.\" intermediate and printed output.
.\"
.\" This manual is distributed in the hope that it will be useful,
.\" but WITHOUT ANY WARRANTY; without even the implied warranty of
.\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
.\" GNU General Public License for more details.
.\"
.\" You should have received a copy of the GNU General Public
.\" License along with this manual.  If not, see
.\" <http://www.gnu.org/licenses/>.
.\" 
.fam T
.TH GETFACL 1 "ACL File Utilities" "May 2000" "Access Control Lists"
.SH NAME
getfacl \- get file access control lists
.SH SYNOPSIS

.B getfacl
[\-aceEsRLPtpndvh] file ...

.B getfacl
[\-aceEsRLPtpndvh] \-

.SH DESCRIPTION
For each file, getfacl displays the file name, owner, the group,
and the Access Control List (ACL). 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:
.fam C
.RS
.nf
 1:  # file: somedir/
 2:  # owner: lisa
 3:  # group: staff
 4:  # flags: \-s\-
 5:  user::rwx
 6:  user:joe:rwx               #effective:r\-x
 7:  group::rwx                 #effective:r\-x
 8:  group:cool:r\-x
 9:  mask::r\-x
10:  other::r\-x
11:  default:user::rwx
12:  default:user:joe:rwx       #effective:r\-x
13:  default:group::r\-x
14:  default:mask::r\-x
15:  default:other::\-\-\-

.fi
.RE
.fam T

Lines 1\-\-3 indicate the file name, owner, and owning group.

Line 4 indicates the setuid (s), setgid (s), and sticky (t) bits: either
the letter representing the bit, or else a dash (\-). This line is
included if any of those bits is set and left out otherwise, so it will
not be shown for most files. (See CONFORMANCE TO POSIX 1003.1e DRAFT STANDARD\~17
below.)

Lines 5, 7 and 10 correspond to the user, group and other fields of
the file mode permission bits. These three are called the base ACL
entries. Lines 6 and 8 are named user and named group entries. Line 9 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 11\-\-15 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.

.SS PERMISSIONS
Process 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.

.SH OPTIONS
.TP 4
.I \-a, \-\-access
Display the file access control list.
.TP
.I \-d, \-\-default
Display the default access control list.
.TP
.I \-c, \-\-omit-header
Do not display the comment header (the first three lines of each file's output).
.TP
.I \-e, \-\-all-effective
Print all effective rights comments, even if identical to the rights defined by the ACL entry.
.TP
.I \-E, \-\-no-effective
Do not print effective rights comments.
.TP
.I \-s, \-\-skip-base
Skip files that only have the base ACL entries (owner, group, others).
.TP
.I \-R, \-\-recursive
List the ACLs of all files and directories recursively.
.TP
.I \-L, \-\-logical
Logical walk, follow symbolic links to directories. The default behavior is to follow
symbolic link arguments, and skip symbolic links encountered in subdirectories.
Only effective in combination with \-R.
.TP
.I \-P, \-\-physical
Physical walk, do not follow symbolic links to directories. This also skips symbolic
link arguments.
Only effective in combination with \-R.
.TP
.I \-t, \-\-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.
.TP
.I \-p, \-\-absolute-names
Do not strip leading slash characters (`/'). The default behavior is to
strip leading slash characters.
.TP
.I \-n, \-\-numeric
List numeric user and group IDs
.TP
.I \-v, \-\-version
Print the version of getfacl and exit.
.TP
.I \-h, \-\-help
Print help explaining the command line options.
.TP
.I \-\-
End of command line options. All remaining parameters are interpreted as file names, even if they start with a dash character.
.TP
.I \-
If the file name parameter is a single dash character, getfacl reads a list of files from standard input.

.SH CONFORMANCE TO POSIX 1003.1e DRAFT STANDARD 17
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
.I \-d
option is given. If no command line parameter is given,
.I getfacl
behaves as if it was invoked as ``getfacl \-''.
No flags comments indicating the setuid, setgid, and sticky bits are generated.
.SH AUTHOR
Andreas Gruenbacher,
.RI < a.gruenbacher@bestbits.at >.

Please send your bug reports and comments to the above address.
.SH SEE ALSO
.BR setfacl "(1), " acl (5)