]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - bin/getfacl/getfacl.1
libarchive: merge security fix from vendor branch
[FreeBSD/FreeBSD.git] / bin / getfacl / getfacl.1
1 .\"-
2 .\" Copyright (c) 2000, 2001, 2002 Robert N. M. Watson
3 .\" All rights reserved.
4 .\"
5 .\" This software was developed by Robert Watson for the TrustedBSD Project.
6 .\"
7 .\" Redistribution and use in source and binary forms, with or without
8 .\" modification, are permitted provided that the following conditions
9 .\" are met:
10 .\" 1. Redistributions of source code must retain the above copyright
11 .\"    notice, this list of conditions and the following disclaimer.
12 .\" 2. Redistributions in binary form must reproduce the above copyright
13 .\"    notice, this list of conditions and the following disclaimer in the
14 .\"    documentation and/or other materials provided with the distribution.
15 .\"
16 .\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
17 .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
18 .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
19 .\" ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
20 .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
21 .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
22 .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
23 .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
24 .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
25 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
26 .\" SUCH DAMAGE.
27 .\"
28 .\" Developed by the TrustedBSD Project.
29 .\" Support for POSIX.1e access control lists.
30 .\"
31 .Dd September 4, 2009
32 .Dt GETFACL 1
33 .Os
34 .Sh NAME
35 .Nm getfacl
36 .Nd get ACL information
37 .Sh SYNOPSIS
38 .Nm
39 .Op Fl dhinqv
40 .Op Ar
41 .Sh DESCRIPTION
42 The
43 .Nm
44 utility writes discretionary access control information associated with
45 the specified file(s) to standard output.
46 If the
47 .Xr getconf 1
48 utility indicates that
49 .Brq Va _POSIX_ACL_EXTENDED
50 is not in effect for a
51 .Ar file
52 then the standard discretionary access permissions are interpreted as
53 an ACL containing only the required ACL entries.
54 .Pp
55 The following option is available:
56 .Bl -tag -width indent
57 .It Fl d
58 The operation applies to the default ACL of a directory instead of the
59 access ACL.
60 An error is generated if a default ACL cannot be associated with
61 .Ar file .
62 This option is not valid for NFSv4 ACLs.
63 .It Fl h
64 If the target of the operation is a symbolic link, return the ACL from
65 the symbolic link itself rather than following the link.
66 .It Fl i
67 For NFSv4 ACLs, append numerical ID at the end of each entry containing
68 user or group name.
69 Ignored for POSIX.1e ACLs.
70 .It Fl n
71 Display user and group IDs numerically rather than converting to
72 a user or group name.
73 Ignored for POSIX.1e ACLs.
74 .It Fl q
75 Do not write commented information about file name and ownership.
76 This is
77 useful when dealing with filenames with unprintable characters.
78 .It Fl v
79 For NFSv4 ACLs, display access mask and flags in a verbose form.
80 Ignored for POSIX.1e ACLs.
81 .El
82 .Pp
83 The following operand is available:
84 .Bl -tag -width indent
85 .It Ar file
86 A pathname of a file whose ACL shall be retrieved.
87 If
88 .Ar file
89 is not specified, or a
90 .Ar file
91 is specified as
92 .Fl ,
93 then
94 .Nm
95 reads a list of pathnames, each terminated by one newline character,
96 from the standard input.
97 .El
98 .Pp
99 For an explanation of the ACL syntax, see the
100 .Xr setfacl 1
101 manual page.
102 .Sh EXIT STATUS
103 .Ex -std
104 .Sh EXAMPLES
105 .Dl getfacl /
106 .Pp
107 Retrieve ACL for the directory
108 .Pa / .
109 .Pp
110 .Dl getfacl -d /
111 .Pp
112 Retrieve the default ACL for the directory
113 .Pa / ,
114 if any.
115 .Sh SEE ALSO
116 .Xr setfacl 1 ,
117 .Xr acl 3 ,
118 .Xr getextattr 8 ,
119 .Xr setextattr 8 ,
120 .Xr acl 9 ,
121 .Xr extattr 9
122 .Sh STANDARDS
123 The
124 .Nm
125 utility is expected to be
126 .Tn IEEE
127 Std 1003.2c compliant.
128 .Sh HISTORY
129 Extended Attribute and Access Control List support was developed as part
130 of the
131 .Tn TrustedBSD
132 Project and introduced in
133 .Fx 5.0 .
134 .Sh AUTHORS
135 .An Robert N M Watson