2001-03-19 18:09:25 +00:00
|
|
|
.\"-
|
2002-12-30 15:36:29 +00:00
|
|
|
.\" Copyright (c) 2000, 2001, 2002 Robert N. M. Watson
|
2001-03-19 18:09:25 +00:00
|
|
|
.\" All rights reserved.
|
|
|
|
.\"
|
2001-11-16 15:59:46 +00:00
|
|
|
.\" This software was developed by Robert Watson for the TrustedBSD Project.
|
|
|
|
.\"
|
2001-03-19 18:09:25 +00:00
|
|
|
.\" Redistribution and use in source and binary forms, with or without
|
|
|
|
.\" modification, are permitted provided that the following conditions
|
|
|
|
.\" are met:
|
|
|
|
.\" 1. Redistributions of source code must retain the above copyright
|
|
|
|
.\" notice, this list of conditions and the following disclaimer.
|
|
|
|
.\" 2. Redistributions in binary form must reproduce the above copyright
|
|
|
|
.\" notice, this list of conditions and the following disclaimer in the
|
|
|
|
.\" documentation and/or other materials provided with the distribution.
|
|
|
|
.\"
|
|
|
|
.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
|
|
|
|
.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
|
|
|
.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
|
|
|
.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
|
|
|
|
.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
|
|
|
.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
|
|
|
.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
|
|
|
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
|
|
|
.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
|
|
|
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
|
|
|
.\" SUCH DAMAGE.
|
|
|
|
.\"
|
2004-05-16 21:34:31 +00:00
|
|
|
.\" $FreeBSD$
|
2001-03-19 18:09:25 +00:00
|
|
|
.\"
|
2001-11-16 15:59:46 +00:00
|
|
|
.\" Developed by the TrustedBSD Project.
|
|
|
|
.\" Support for POSIX.1e access control lists.
|
|
|
|
.\"
|
2009-11-02 12:35:38 +00:00
|
|
|
.Dd September 4, 2009
|
2001-03-19 18:09:25 +00:00
|
|
|
.Dt GETFACL 1
|
|
|
|
.Os
|
|
|
|
.Sh NAME
|
|
|
|
.Nm getfacl
|
2001-04-18 15:54:10 +00:00
|
|
|
.Nd get ACL information
|
2001-03-19 18:09:25 +00:00
|
|
|
.Sh SYNOPSIS
|
2001-03-23 08:14:27 +00:00
|
|
|
.Nm
|
2009-09-04 10:22:29 +00:00
|
|
|
.Op Fl dhinqv
|
2001-03-23 08:14:27 +00:00
|
|
|
.Op Ar
|
2001-03-19 18:09:25 +00:00
|
|
|
.Sh DESCRIPTION
|
|
|
|
The
|
|
|
|
.Nm
|
|
|
|
utility writes discretionary access control information associated with
|
|
|
|
the specified file(s) to standard output.
|
|
|
|
If the
|
2001-03-23 08:14:27 +00:00
|
|
|
.Xr getconf 1
|
2001-03-19 18:09:25 +00:00
|
|
|
utility indicates that
|
2010-06-11 06:04:07 +00:00
|
|
|
.Brq Va _POSIX_ACL_EXTENDED
|
2001-03-19 18:09:25 +00:00
|
|
|
is not in effect for a
|
|
|
|
.Ar file
|
|
|
|
then the standard discretionary access permissions are interpreted as
|
|
|
|
an ACL containing only the required ACL entries.
|
|
|
|
.Pp
|
|
|
|
The following option is available:
|
|
|
|
.Bl -tag -width indent
|
|
|
|
.It Fl d
|
|
|
|
The operation applies to the default ACL of a directory instead of the
|
|
|
|
access ACL.
|
2001-03-23 08:14:27 +00:00
|
|
|
An error is generated if a default ACL cannot be associated with
|
|
|
|
.Ar file .
|
2009-09-04 10:22:29 +00:00
|
|
|
This option is not valid for NFSv4 ACLs.
|
2002-12-30 15:36:29 +00:00
|
|
|
.It Fl h
|
|
|
|
If the target of the operation is a symbolic link, return the ACL from
|
2003-02-23 01:43:45 +00:00
|
|
|
the symbolic link itself rather than following the link.
|
2009-09-04 10:22:29 +00:00
|
|
|
.It Fl i
|
|
|
|
For NFSv4 ACLs, append numerical ID at the end of each entry containing
|
|
|
|
user or group name.
|
|
|
|
Ignored for POSIX.1e ACLs.
|
|
|
|
.It Fl n
|
|
|
|
Display user and group IDs numerically rather than converting to
|
|
|
|
a user or group name.
|
|
|
|
Ignored for POSIX.1e ACLs.
|
2006-03-13 11:45:29 +00:00
|
|
|
.It Fl q
|
2006-09-17 17:40:07 +00:00
|
|
|
Do not write commented information about file name and ownership.
|
|
|
|
This is
|
2006-03-13 11:45:29 +00:00
|
|
|
useful when dealing with filenames with unprintable characters.
|
2009-09-04 10:22:29 +00:00
|
|
|
.It Fl v
|
|
|
|
For NFSv4 ACLs, display access mask and flags in a verbose form.
|
|
|
|
Ignored for POSIX.1e ACLs.
|
2001-03-19 18:09:25 +00:00
|
|
|
.El
|
|
|
|
.Pp
|
|
|
|
The following operand is available:
|
|
|
|
.Bl -tag -width indent
|
|
|
|
.It Ar file
|
|
|
|
A pathname of a file whose ACL shall be retrieved.
|
|
|
|
If
|
2001-03-23 08:14:27 +00:00
|
|
|
.Ar file
|
2001-03-19 18:09:25 +00:00
|
|
|
is not specified, or a
|
2001-03-23 08:14:27 +00:00
|
|
|
.Ar file
|
|
|
|
is specified as
|
|
|
|
.Fl ,
|
|
|
|
then
|
2001-03-19 18:09:25 +00:00
|
|
|
.Nm
|
2001-03-23 08:14:27 +00:00
|
|
|
reads a list of pathnames, each terminated by one newline character,
|
2001-03-19 18:09:25 +00:00
|
|
|
from the standard input.
|
|
|
|
.El
|
2012-09-04 12:02:23 +00:00
|
|
|
.Pp
|
|
|
|
For an explanation of the ACL syntax, see the
|
|
|
|
.Xr setfacl 1
|
|
|
|
manual page.
|
2005-01-16 16:41:59 +00:00
|
|
|
.Sh EXIT STATUS
|
|
|
|
.Ex -std
|
2001-03-19 18:09:25 +00:00
|
|
|
.Sh EXAMPLES
|
|
|
|
.Dl getfacl /
|
|
|
|
.Pp
|
2001-03-23 08:14:27 +00:00
|
|
|
Retrieve ACL for the directory
|
|
|
|
.Pa / .
|
2001-03-19 18:09:25 +00:00
|
|
|
.Pp
|
|
|
|
.Dl getfacl -d /
|
|
|
|
.Pp
|
2001-03-23 08:14:27 +00:00
|
|
|
Retrieve the default ACL for the directory
|
|
|
|
.Pa / ,
|
|
|
|
if any.
|
2001-03-19 18:09:25 +00:00
|
|
|
.Sh SEE ALSO
|
|
|
|
.Xr setfacl 1 ,
|
|
|
|
.Xr acl 3 ,
|
|
|
|
.Xr getextattr 8 ,
|
|
|
|
.Xr setextattr 8 ,
|
|
|
|
.Xr acl 9 ,
|
|
|
|
.Xr extattr 9
|
|
|
|
.Sh STANDARDS
|
|
|
|
The
|
|
|
|
.Nm
|
2001-03-23 08:14:27 +00:00
|
|
|
utility is expected to be
|
|
|
|
.Tn IEEE
|
|
|
|
Std 1003.2c compliant.
|
2001-03-19 18:09:25 +00:00
|
|
|
.Sh HISTORY
|
|
|
|
Extended Attribute and Access Control List support was developed as part
|
2001-03-23 08:14:27 +00:00
|
|
|
of the
|
|
|
|
.Tn TrustedBSD
|
|
|
|
Project and introduced in
|
|
|
|
.Fx 5.0 .
|
2001-03-19 18:09:25 +00:00
|
|
|
.Sh AUTHORS
|
2001-03-23 08:14:27 +00:00
|
|
|
.An Robert N M Watson
|