xref: /netbsd-src/bin/getfacl/getfacl.1 (revision 55f1f0071b13fad77f59dc0c36dcc32800090ac6)
1*55f1f007Swiz.\" $NetBSD: getfacl.1,v 1.2 2020/06/18 19:36:13 wiz Exp $
29aa2a9c3Schristos.\"-
39aa2a9c3Schristos.\" Copyright (c) 2000, 2001, 2002 Robert N. M. Watson
49aa2a9c3Schristos.\" All rights reserved.
59aa2a9c3Schristos.\"
69aa2a9c3Schristos.\" This software was developed by Robert Watson for the TrustedBSD Project.
79aa2a9c3Schristos.\"
89aa2a9c3Schristos.\" Redistribution and use in source and binary forms, with or without
99aa2a9c3Schristos.\" modification, are permitted provided that the following conditions
109aa2a9c3Schristos.\" are met:
119aa2a9c3Schristos.\" 1. Redistributions of source code must retain the above copyright
129aa2a9c3Schristos.\"    notice, this list of conditions and the following disclaimer.
139aa2a9c3Schristos.\" 2. Redistributions in binary form must reproduce the above copyright
149aa2a9c3Schristos.\"    notice, this list of conditions and the following disclaimer in the
159aa2a9c3Schristos.\"    documentation and/or other materials provided with the distribution.
169aa2a9c3Schristos.\"
179aa2a9c3Schristos.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
189aa2a9c3Schristos.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
199aa2a9c3Schristos.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
209aa2a9c3Schristos.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
219aa2a9c3Schristos.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
229aa2a9c3Schristos.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
239aa2a9c3Schristos.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
249aa2a9c3Schristos.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
259aa2a9c3Schristos.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
269aa2a9c3Schristos.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
279aa2a9c3Schristos.\" SUCH DAMAGE.
289aa2a9c3Schristos.\"
299aa2a9c3Schristos.\" $FreeBSD: head/bin/getfacl/getfacl.1 240085 2012-09-04 12:02:23Z trasz $
309aa2a9c3Schristos.\"
319aa2a9c3Schristos.\" Developed by the TrustedBSD Project.
329aa2a9c3Schristos.\" Support for POSIX.1e access control lists.
339aa2a9c3Schristos.\"
349aa2a9c3Schristos.Dd September 4, 2009
359aa2a9c3Schristos.Dt GETFACL 1
369aa2a9c3Schristos.Os
379aa2a9c3Schristos.Sh NAME
389aa2a9c3Schristos.Nm getfacl
399aa2a9c3Schristos.Nd get ACL information
409aa2a9c3Schristos.Sh SYNOPSIS
419aa2a9c3Schristos.Nm
429aa2a9c3Schristos.Op Fl dhinqv
439aa2a9c3Schristos.Op Ar
449aa2a9c3Schristos.Sh DESCRIPTION
459aa2a9c3SchristosThe
469aa2a9c3Schristos.Nm
479aa2a9c3Schristosutility writes discretionary access control information associated with
489aa2a9c3Schristosthe specified file(s) to standard output.
499aa2a9c3SchristosIf the
509aa2a9c3Schristos.Xr getconf 1
519aa2a9c3Schristosutility indicates that
529aa2a9c3Schristos.Brq Va _POSIX_ACL_EXTENDED
539aa2a9c3Schristosis not in effect for a
549aa2a9c3Schristos.Ar file
559aa2a9c3Schristosthen the standard discretionary access permissions are interpreted as
569aa2a9c3Schristosan ACL containing only the required ACL entries.
579aa2a9c3Schristos.Pp
589aa2a9c3SchristosThe following option is available:
599aa2a9c3Schristos.Bl -tag -width indent
609aa2a9c3Schristos.It Fl d
619aa2a9c3SchristosThe operation applies to the default ACL of a directory instead of the
629aa2a9c3Schristosaccess ACL.
639aa2a9c3SchristosAn error is generated if a default ACL cannot be associated with
649aa2a9c3Schristos.Ar file .
659aa2a9c3SchristosThis option is not valid for NFSv4 ACLs.
669aa2a9c3Schristos.It Fl h
679aa2a9c3SchristosIf the target of the operation is a symbolic link, return the ACL from
689aa2a9c3Schristosthe symbolic link itself rather than following the link.
699aa2a9c3Schristos.It Fl i
709aa2a9c3SchristosFor NFSv4 ACLs, append numerical ID at the end of each entry containing
719aa2a9c3Schristosuser or group name.
729aa2a9c3SchristosIgnored for POSIX.1e ACLs.
739aa2a9c3Schristos.It Fl n
749aa2a9c3SchristosDisplay user and group IDs numerically rather than converting to
759aa2a9c3Schristosa user or group name.
769aa2a9c3SchristosIgnored for POSIX.1e ACLs.
779aa2a9c3Schristos.It Fl q
789aa2a9c3SchristosDo not write commented information about file name and ownership.
799aa2a9c3SchristosThis is
809aa2a9c3Schristosuseful when dealing with filenames with unprintable characters.
819aa2a9c3Schristos.It Fl v
829aa2a9c3SchristosFor NFSv4 ACLs, display access mask and flags in a verbose form.
839aa2a9c3SchristosIgnored for POSIX.1e ACLs.
849aa2a9c3Schristos.El
859aa2a9c3Schristos.Pp
869aa2a9c3SchristosThe following operand is available:
879aa2a9c3Schristos.Bl -tag -width indent
889aa2a9c3Schristos.It Ar file
899aa2a9c3SchristosA pathname of a file whose ACL shall be retrieved.
909aa2a9c3SchristosIf
919aa2a9c3Schristos.Ar file
929aa2a9c3Schristosis not specified, or a
939aa2a9c3Schristos.Ar file
949aa2a9c3Schristosis specified as
959aa2a9c3Schristos.Fl ,
969aa2a9c3Schristosthen
979aa2a9c3Schristos.Nm
989aa2a9c3Schristosreads a list of pathnames, each terminated by one newline character,
999aa2a9c3Schristosfrom the standard input.
1009aa2a9c3Schristos.El
1019aa2a9c3Schristos.Pp
1029aa2a9c3SchristosFor an explanation of the ACL syntax, see the
1039aa2a9c3Schristos.Xr setfacl 1
1049aa2a9c3Schristosmanual page.
1059aa2a9c3Schristos.Sh EXIT STATUS
1069aa2a9c3Schristos.Ex -std
1079aa2a9c3Schristos.Sh EXAMPLES
1089aa2a9c3Schristos.Dl getfacl /
1099aa2a9c3Schristos.Pp
1109aa2a9c3SchristosRetrieve ACL for the directory
1119aa2a9c3Schristos.Pa / .
1129aa2a9c3Schristos.Pp
1139aa2a9c3Schristos.Dl getfacl -d /
1149aa2a9c3Schristos.Pp
1159aa2a9c3SchristosRetrieve the default ACL for the directory
1169aa2a9c3Schristos.Pa / ,
1179aa2a9c3Schristosif any.
1189aa2a9c3Schristos.Sh SEE ALSO
119*55f1f007Swiz.Xr getextattr 1 ,
120*55f1f007Swiz.Xr setextattr 1 ,
1219aa2a9c3Schristos.Xr setfacl 1 ,
1229aa2a9c3Schristos.Xr acl 3 ,
123*55f1f007Swiz.\".Xr acl 9 ,
1249aa2a9c3Schristos.Xr extattr 9
1259aa2a9c3Schristos.Sh STANDARDS
1269aa2a9c3SchristosThe
1279aa2a9c3Schristos.Nm
1289aa2a9c3Schristosutility is expected to be
1299aa2a9c3Schristos.Tn IEEE
1309aa2a9c3SchristosStd 1003.2c compliant.
1319aa2a9c3Schristos.Sh HISTORY
1329aa2a9c3SchristosExtended Attribute and Access Control List support was developed as part
1339aa2a9c3Schristosof the
1349aa2a9c3Schristos.Tn TrustedBSD
1359aa2a9c3SchristosProject and introduced in
1369aa2a9c3Schristos.Fx 5.0 .
1379aa2a9c3Schristos.Sh AUTHORS
1389aa2a9c3Schristos.An Robert N M Watson
139