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