1 '\" te
2 .\" \&.Copyright (c) 2002, Sun Microsystems, Inc. All Rights Reserved
3 .\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
4 .\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
5 .\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
6 .TH GETFACL 1 "Nov 5, 1994"
7 .SH NAME
8 getfacl \- display discretionary file information
9 .SH SYNOPSIS
10 .LP
11 .nf
12 \fBgetfacl\fR [\fB-ad\fR] \fIfile\fR...
13 .fi
14
15 .SH DESCRIPTION
16 .sp
17 .LP
18 For each argument that is a regular file, special file, or named pipe, the
19 \fBgetfacl\fR utility displays the owner, the group, and the Access Control
20 List (\fBACL\fR). For each directory argument, \fBgetfacl\fR displays the
21 owner, the group, and the \fBACL\fR and/or the default \fBACL\fR. Only
22 directories contain default \fBACL\fRs.
23 .sp
24 .LP
25 The \fBgetfacl\fR utility may be executed on a file system that does not
26 support \fBACL\fRs. It reports the \fBACL\fR based on the base permission bits.
27 .sp
28 .LP
29 With no options specified, \fBgetfacl\fR displays the filename, the file owner,
30 the file group owner, and both the \fBACL\fR and the default \fBACL\fR, if it
31 exists.
32 .SH OPTIONS
33 .sp
34 .LP
35 The following options are supported:
36 .sp
37 .ne 2
38 .na
39 \fB\fB-a\fR\fR
40 .ad
41 .RS 6n
42 Displays the filename, the file owner, the file group owner, and the \fBACL\fR
43 of the file.
44 .RE
45
46 .sp
47 .ne 2
48 .na
49 \fB\fB-d\fR\fR
50 .ad
51 .RS 6n
52 Displays the filename, the file owner, the file group owner, and the default
53 \fBACL\fR of the file, if it exists.
54 .RE
55
56 .SH OPERANDS
57 .sp
58 .LP
59 The following operands are supported:
60 .sp
61 .ne 2
62 .na
63 \fB\fIfile\fR\fR
64 .ad
65 .RS 8n
66 The path name of a regular file, special file, or named pipe.
67 .RE
68
69 .SH OUTPUT
70 .sp
71 .LP
72 The format for \fBACL\fR output is as follows:
73 .sp
74 .in +2
75 .nf
76 # file: filename
77 # owner: uid
78 # group: gid
79 user::perm
80 user:uid:perm
81 group::perm
82 group:gid:perm
83 mask:perm
84 other:perm
85 default:user::perm
86 default:user:uid:perm
87 default:group::perm
88 default:group:gid:perm
89 default:mask:perm
90 default:other:perm
91 .fi
137 group name or a group \fBID\fR if there is no entry for the \fBgid\fR in the
138 system group file, \fB/etc/group\fR. The \fBperm\fR is a three character string
139 composed of the letters representing the separate discretionary access rights:
140 \fBr\fR (read), \fBw\fR (write), \fBx\fR (execute/search), or the place holder
141 character \fB\(mi\fR\&. The \fBperm\fR is displayed in the following order:
142 \fBrwx\fR. If a permission is not granted by an \fBACL\fR entry, the place
143 holder character appears.
144 .sp
145 .LP
146 If you use the \fBchmod\fR(1) command to change the file group owner
147 permissions on a file with \fBACL\fR entries, both the file group owner
148 permissions and the \fBACL\fR mask are changed to the new permissions. Be aware
149 that the new \fBACL\fR mask permissions may change the effective permissions
150 for additional users and groups who have \fBACL\fR entries on the file.
151 .sp
152 .LP
153 In order to indicate that the \fBACL\fR mask restricts an \fBACL\fR entry,
154 \fBgetfacl\fR displays an additional tab character, pound sign (\fB#\fR), and
155 the actual permissions granted, following the entry.
156 .SH EXAMPLES
157 .LP
158 \fBExample 1 \fRDisplaying file information
159 .sp
160 .LP
161 Given file \fBfoo\fR, with an \fBACL\fR six entries long, the command
162
163 .sp
164 .in +2
165 .nf
166 host% \fBgetfacl foo\fR
167 .fi
168 .in -2
169 .sp
170
171 .sp
172 .LP
173 would print:
174
175 .sp
176 .in +2
177 .nf
241 .LP
242 would print:
243
244 .sp
245 .in +2
246 .nf
247 # file: doo
248 # owner: shea
249 # group: staff
250 default:user::rwx
251 default:user:spy:\|\(mi\|\(mi\|\(mi
252 default:user:mookie:r\|\(mi\|\(mi
253 default:group::r\|\(mi\|\(mi
254 default:mask::\|\(mi\|\(mi\|\(mi
255 default:other::\|\(mi\|\(mi\|\(mi
256 .fi
257 .in -2
258 .sp
259
260 .SH FILES
261 .sp
262 .ne 2
263 .na
264 \fB\fB/etc/passwd\fR\fR
265 .ad
266 .RS 15n
267 system password file
268 .RE
269
270 .sp
271 .ne 2
272 .na
273 \fB\fB/etc/group\fR\fR
274 .ad
275 .RS 15n
276 group file
277 .RE
278
279 .SH ATTRIBUTES
280 .sp
281 .LP
282 See \fBattributes\fR(5) for descriptions of the following attributes:
283 .sp
284
285 .sp
286 .TS
287 box;
288 c | c
289 l | l .
290 ATTRIBUTE TYPE ATTRIBUTE VALUE
291 _
292 Interface Stability Evolving
293 .TE
294
295 .SH SEE ALSO
296 .sp
297 .LP
298 \fBchmod\fR(1), \fBls\fR(1), \fBsetfacl\fR(1), \fBacl\fR(2),
299 \fBaclsort\fR(3SEC), \fBgroup\fR(4), \fBpasswd\fR(4), \fBattributes\fR(5)
300 .SH NOTES
301 .sp
302 .LP
303 The output from \fBgetfacl\fR is in the correct format for input to the
304 \fBsetfacl\fR \fB-f\fR command. If the output from \fBgetfacl\fR is redirected
305 to a file, the file may be used as input to \fBsetfacl\fR. In this way, a user
306 may easily assign one file's \fBACL\fR to another file.
|
1 '\" te
2 .\" \&.Copyright (c) 2002, Sun Microsystems, Inc. All Rights Reserved
3 .\" Copyright (c) 2020 Peter Tribble.
4 .\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
5 .\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
6 .\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
7 .TH GETFACL 1 "Feb 8, 2020"
8 .SH NAME
9 getfacl \- display discretionary file information
10 .SH SYNOPSIS
11 .nf
12 \fBgetfacl\fR [\fB-ad\fR] \fIfile\fR...
13 .fi
14
15 .SH DESCRIPTION
16 For each argument that is a regular file, special file, or named pipe, the
17 \fBgetfacl\fR utility displays the owner, the group, and the Access Control
18 List (\fBACL\fR). For each directory argument, \fBgetfacl\fR displays the
19 owner, the group, and the \fBACL\fR and/or the default \fBACL\fR. Only
20 directories contain default \fBACL\fRs.
21 .sp
22 .LP
23 The \fBgetfacl\fR utility will fail if executed on a file system that supports
24 NFSv4 \fBACL\fRs. See \fBacl\fR(5) for a description of the difference
25 between the older POSIX-draft \fBACL\fRs and the newer NFSv4 \fBACL\fRs. The
26 \fBls\fR(1) utility, when used with the \fB-v\fR or \fB-V\fR options, will
27 display \fBACL\fRs on all types of file system.
28 .sp
29 .LP
30 The \fBgetfacl\fR utility may be executed on a file system that does not
31 support \fBACL\fRs. It reports the \fBACL\fR based on the base permission bits.
32 .sp
33 .LP
34 With no options specified, \fBgetfacl\fR displays the filename, the file owner,
35 the file group owner, and both the \fBACL\fR and the default \fBACL\fR, if it
36 exists.
37 .SH OPTIONS
38 The following options are supported:
39 .sp
40 .ne 2
41 .na
42 \fB\fB-a\fR\fR
43 .ad
44 .RS 6n
45 Displays the filename, the file owner, the file group owner, and the \fBACL\fR
46 of the file.
47 .RE
48
49 .sp
50 .ne 2
51 .na
52 \fB\fB-d\fR\fR
53 .ad
54 .RS 6n
55 Displays the filename, the file owner, the file group owner, and the default
56 \fBACL\fR of the file, if it exists.
57 .RE
58
59 .SH OPERANDS
60 The following operands are supported:
61 .sp
62 .ne 2
63 .na
64 \fB\fIfile\fR\fR
65 .ad
66 .RS 8n
67 The path name of a regular file, special file, or named pipe.
68 .RE
69
70 .SH OUTPUT
71 The format for \fBACL\fR output is as follows:
72 .sp
73 .in +2
74 .nf
75 # file: filename
76 # owner: uid
77 # group: gid
78 user::perm
79 user:uid:perm
80 group::perm
81 group:gid:perm
82 mask:perm
83 other:perm
84 default:user::perm
85 default:user:uid:perm
86 default:group::perm
87 default:group:gid:perm
88 default:mask:perm
89 default:other:perm
90 .fi
136 group name or a group \fBID\fR if there is no entry for the \fBgid\fR in the
137 system group file, \fB/etc/group\fR. The \fBperm\fR is a three character string
138 composed of the letters representing the separate discretionary access rights:
139 \fBr\fR (read), \fBw\fR (write), \fBx\fR (execute/search), or the place holder
140 character \fB\(mi\fR\&. The \fBperm\fR is displayed in the following order:
141 \fBrwx\fR. If a permission is not granted by an \fBACL\fR entry, the place
142 holder character appears.
143 .sp
144 .LP
145 If you use the \fBchmod\fR(1) command to change the file group owner
146 permissions on a file with \fBACL\fR entries, both the file group owner
147 permissions and the \fBACL\fR mask are changed to the new permissions. Be aware
148 that the new \fBACL\fR mask permissions may change the effective permissions
149 for additional users and groups who have \fBACL\fR entries on the file.
150 .sp
151 .LP
152 In order to indicate that the \fBACL\fR mask restricts an \fBACL\fR entry,
153 \fBgetfacl\fR displays an additional tab character, pound sign (\fB#\fR), and
154 the actual permissions granted, following the entry.
155 .SH EXAMPLES
156 \fBExample 1 \fRDisplaying file information
157 .sp
158 .LP
159 Given file \fBfoo\fR, with an \fBACL\fR six entries long, the command
160
161 .sp
162 .in +2
163 .nf
164 host% \fBgetfacl foo\fR
165 .fi
166 .in -2
167 .sp
168
169 .sp
170 .LP
171 would print:
172
173 .sp
174 .in +2
175 .nf
239 .LP
240 would print:
241
242 .sp
243 .in +2
244 .nf
245 # file: doo
246 # owner: shea
247 # group: staff
248 default:user::rwx
249 default:user:spy:\|\(mi\|\(mi\|\(mi
250 default:user:mookie:r\|\(mi\|\(mi
251 default:group::r\|\(mi\|\(mi
252 default:mask::\|\(mi\|\(mi\|\(mi
253 default:other::\|\(mi\|\(mi\|\(mi
254 .fi
255 .in -2
256 .sp
257
258 .SH FILES
259 .ne 2
260 .na
261 \fB\fB/etc/passwd\fR\fR
262 .ad
263 .RS 15n
264 system password file
265 .RE
266
267 .sp
268 .ne 2
269 .na
270 \fB\fB/etc/group\fR\fR
271 .ad
272 .RS 15n
273 group file
274 .RE
275
276 .SH ATTRIBUTES
277 See \fBattributes\fR(5) for descriptions of the following attributes:
278 .sp
279
280 .sp
281 .TS
282 box;
283 c | c
284 l | l .
285 ATTRIBUTE TYPE ATTRIBUTE VALUE
286 _
287 Interface Stability Evolving
288 .TE
289
290 .SH SEE ALSO
291 \fBchmod\fR(1), \fBls\fR(1), \fBsetfacl\fR(1), \fBacl\fR(2),
292 \fBaclsort\fR(3SEC), \fBgroup\fR(4), \fBpasswd\fR(4), \fBacl\fR(5),
293 \fBattributes\fR(5)
294 .SH NOTES
295 The output from \fBgetfacl\fR is in the correct format for input to the
296 \fBsetfacl\fR \fB-f\fR command. If the output from \fBgetfacl\fR is redirected
297 to a file, the file may be used as input to \fBsetfacl\fR. In this way, a user
298 may easily assign one file's \fBACL\fR to another file.
|