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 March 13, 2006 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 dhq 42.Op Ar 43.Sh DESCRIPTION 44The 45.Nm 46utility writes discretionary access control information associated with 47the specified file(s) to standard output. 48If the 49.Xr getconf 1 50utility indicates that 51.Eq { } Va _POSIX_ACL_EXTENDED 52is not in effect for a 53.Ar file 54then the standard discretionary access permissions are interpreted as 55an ACL containing only the required ACL entries. 56.Pp 57The following option is available: 58.Bl -tag -width indent 59.It Fl d 60The operation applies to the default ACL of a directory instead of the 61access ACL. 62An error is generated if a default ACL cannot be associated with 63.Ar file . 64.It Fl h 65If the target of the operation is a symbolic link, return the ACL from 66the symbolic link itself rather than following the link. 67.It Fl q 68Do not write commented information about file name and ownership. 69This is 70useful when dealing with filenames with unprintable characters. 71.El 72.Pp 73The following operand is available: 74.Bl -tag -width indent 75.It Ar file 76A pathname of a file whose ACL shall be retrieved. 77If 78.Ar file 79is not specified, or a 80.Ar file 81is specified as 82.Fl , 83then 84.Nm 85reads a list of pathnames, each terminated by one newline character, 86from the standard input. 87.El 88.Sh EXIT STATUS 89.Ex -std 90.Sh EXAMPLES 91.Dl getfacl / 92.Pp 93Retrieve ACL for the directory 94.Pa / . 95.Pp 96.Dl getfacl -d / 97.Pp 98Retrieve the default ACL for the directory 99.Pa / , 100if any. 101.Sh SEE ALSO 102.Xr setfacl 1 , 103.Xr acl 3 , 104.Xr getextattr 8 , 105.Xr setextattr 8 , 106.Xr acl 9 , 107.Xr extattr 9 108.Sh STANDARDS 109The 110.Nm 111utility is expected to be 112.Tn IEEE 113Std 1003.2c compliant. 114.Sh HISTORY 115Extended Attribute and Access Control List support was developed as part 116of the 117.Tn TrustedBSD 118Project and introduced in 119.Fx 5.0 . 120.Sh AUTHORS 121.An Robert N M Watson 122