]> CyberLeo.Net >> Repos - FreeBSD/stable/10.git/blob - bin/getfacl/getfacl.1
Copy head (r256279) to stable/10 as part of the 10.0-RELEASE cycle.
[FreeBSD/stable/10.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 .\" $FreeBSD$
29 .\"
30 .\" Developed by the TrustedBSD Project.
31 .\" Support for POSIX.1e access control lists.
32 .\"
33 .Dd September 4, 2009
34 .Dt GETFACL 1
35 .Os
36 .Sh NAME
37 .Nm getfacl
38 .Nd get ACL information
39 .Sh SYNOPSIS
40 .Nm
41 .Op Fl dhinqv
42 .Op Ar
43 .Sh DESCRIPTION
44 The
45 .Nm
46 utility writes discretionary access control information associated with
47 the specified file(s) to standard output.
48 If the
49 .Xr getconf 1
50 utility indicates that
51 .Brq Va _POSIX_ACL_EXTENDED
52 is not in effect for a
53 .Ar file
54 then the standard discretionary access permissions are interpreted as
55 an ACL containing only the required ACL entries.
56 .Pp
57 The following option is available:
58 .Bl -tag -width indent
59 .It Fl d
60 The operation applies to the default ACL of a directory instead of the
61 access ACL.
62 An error is generated if a default ACL cannot be associated with
63 .Ar file .
64 This option is not valid for NFSv4 ACLs.
65 .It Fl h
66 If the target of the operation is a symbolic link, return the ACL from
67 the symbolic link itself rather than following the link.
68 .It Fl i
69 For NFSv4 ACLs, append numerical ID at the end of each entry containing
70 user or group name.
71 Ignored for POSIX.1e ACLs.
72 .It Fl n
73 Display user and group IDs numerically rather than converting to
74 a user or group name.
75 Ignored for POSIX.1e ACLs.
76 .It Fl q
77 Do not write commented information about file name and ownership.
78 This is
79 useful when dealing with filenames with unprintable characters.
80 .It Fl v
81 For NFSv4 ACLs, display access mask and flags in a verbose form.
82 Ignored for POSIX.1e ACLs.
83 .El
84 .Pp
85 The following operand is available:
86 .Bl -tag -width indent
87 .It Ar file
88 A pathname of a file whose ACL shall be retrieved.
89 If
90 .Ar file
91 is not specified, or a
92 .Ar file
93 is specified as
94 .Fl ,
95 then
96 .Nm
97 reads a list of pathnames, each terminated by one newline character,
98 from the standard input.
99 .El
100 .Pp
101 For an explanation of the ACL syntax, see the
102 .Xr setfacl 1
103 manual page.
104 .Sh EXIT STATUS
105 .Ex -std
106 .Sh EXAMPLES
107 .Dl getfacl /
108 .Pp
109 Retrieve ACL for the directory
110 .Pa / .
111 .Pp
112 .Dl getfacl -d /
113 .Pp
114 Retrieve the default ACL for the directory
115 .Pa / ,
116 if any.
117 .Sh SEE ALSO
118 .Xr setfacl 1 ,
119 .Xr acl 3 ,
120 .Xr getextattr 8 ,
121 .Xr setextattr 8 ,
122 .Xr acl 9 ,
123 .Xr extattr 9
124 .Sh STANDARDS
125 The
126 .Nm
127 utility is expected to be
128 .Tn IEEE
129 Std 1003.2c compliant.
130 .Sh HISTORY
131 Extended Attribute and Access Control List support was developed as part
132 of the
133 .Tn TrustedBSD
134 Project and introduced in
135 .Fx 5.0 .
136 .Sh AUTHORS
137 .An Robert N M Watson