Git init
[framework/base/acl.git] / man / man1 / getfacl.1
1 .\" Access Control Lists manual pages
2 .\"
3 .\" (C) 2000 Andreas Gruenbacher, <a.gruenbacher@bestbits.at>
4 .\"
5 .\" This is free documentation; you can redistribute it and/or
6 .\" modify it under the terms of the GNU General Public License as
7 .\" published by the Free Software Foundation; either version 2 of
8 .\" the License, or (at your option) any later version.
9 .\"
10 .\" The GNU General Public License's references to "object code"
11 .\" and "executables" are to be interpreted as the output of any
12 .\" document formatting or typesetting system, including
13 .\" intermediate and printed output.
14 .\"
15 .\" This manual is distributed in the hope that it will be useful,
16 .\" but WITHOUT ANY WARRANTY; without even the implied warranty of
17 .\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18 .\" GNU General Public License for more details.
19 .\"
20 .\" You should have received a copy of the GNU General Public
21 .\" License along with this manual.  If not, see
22 .\" <http://www.gnu.org/licenses/>.
23 .\" 
24 .fam T
25 .TH GETFACL 1 "ACL File Utilities" "May 2000" "Access Control Lists"
26 .SH NAME
27 getfacl \- get file access control lists
28 .SH SYNOPSIS
29
30 .B getfacl
31 [\-aceEsRLPtpndvh] file ...
32
33 .B getfacl
34 [\-aceEsRLPtpndvh] \-
35
36 .SH DESCRIPTION
37 For each file, getfacl displays the file name, owner, the group,
38 and the Access Control List (ACL). If a directory has a default ACL,
39 getfacl also displays the default ACL. Non-directories cannot have default ACLs.
40
41 If getfacl is used on a file system that does not support ACLs, getfacl
42 displays the access permissions defined by the traditional file mode permission
43 bits.
44
45 The output format of getfacl is as follows:
46 .fam C
47 .RS
48 .nf
49  1:  # file: somedir/
50  2:  # owner: lisa
51  3:  # group: staff
52  4:  # flags: \-s\-
53  5:  user::rwx
54  6:  user:joe:rwx               #effective:r\-x
55  7:  group::rwx                 #effective:r\-x
56  8:  group:cool:r\-x
57  9:  mask::r\-x
58 10:  other::r\-x
59 11:  default:user::rwx
60 12:  default:user:joe:rwx       #effective:r\-x
61 13:  default:group::r\-x
62 14:  default:mask::r\-x
63 15:  default:other::\-\-\-
64
65 .fi
66 .RE
67 .fam T
68
69 Lines 1\-\-3 indicate the file name, owner, and owning group.
70
71 Line 4 indicates the setuid (s), setgid (s), and sticky (t) bits: either
72 the letter representing the bit, or else a dash (\-). This line is
73 included if any of those bits is set and left out otherwise, so it will
74 not be shown for most files. (See CONFORMANCE TO POSIX 1003.1e DRAFT STANDARD\~17
75 below.)
76
77 Lines 5, 7 and 10 correspond to the user, group and other fields of
78 the file mode permission bits. These three are called the base ACL
79 entries. Lines 6 and 8 are named user and named group entries. Line 9 is
80 the effective rights mask. This entry limits the effective rights granted
81 to all groups and to named users. (The file owner and others permissions
82 are not affected by the effective rights mask; all other entries are.)
83 Lines 11\-\-15 display
84 the default ACL associated with this directory. Directories may
85 have a default ACL. Regular files never have a default ACL.
86
87 The default behavior for getfacl is to display both the ACL and the
88 default ACL, and to include an effective rights comment for lines
89 where the rights of the entry differ from the effective rights.
90
91 If output is to a terminal, the effective rights comment is aligned to
92 column 40. Otherwise, a single tab character separates the ACL entry
93 and the effective rights comment.
94
95 The ACL listings of multiple files are separated by blank lines.
96 The output of getfacl can also be used as input to setfacl.
97
98 .SS PERMISSIONS
99 Process with search access to a file (i.e., processes with read access
100 to the containing directory of a file) are also granted read access
101 to the file's ACLs.  This is analogous to the permissions required for
102 accessing the file mode.
103
104 .SS OPTIONS
105 .TP 4
106 .I \-a, \-\-access
107 Display the file access control list.
108 .TP
109 .I \-d, \-\-default
110 Display the default access control list.
111 .TP
112 .I \-c, \-\-omit-header
113 Do not display the comment header (the first three lines of each file's output).
114 .TP
115 .I \-e, \-\-all-effective
116 Print all effective rights comments, even if identical to the rights defined by the ACL entry.
117 .TP
118 .I \-E, \-\-no-effective
119 Do not print effective rights comments.
120 .TP
121 .I \-s, \-\-skip-base
122 Skip files that only have the base ACL entries (owner, group, others).
123 .TP
124 .I \-R, \-\-recursive
125 List the ACLs of all files and directories recursively.
126 .TP
127 .I \-L, \-\-logical
128 Logical walk, follow symbolic links to directories. The default behavior is to follow
129 symbolic link arguments, and skip symbolic links encountered in subdirectories.
130 Only effective in combination with \-R.
131 .TP
132 .I \-P, \-\-physical
133 Physical walk, do not follow symbolic links to directories. This also skips symbolic
134 link arguments.
135 Only effective in combination with \-R.
136 .TP
137 .I \-t, \-\-tabular
138 Use an alternative tabular output format. The ACL and the default ACL are displayed side by side. Permissions that are ineffective due to the ACL mask entry are displayed capitalized. The entry tag names for the ACL_USER_OBJ and ACL_GROUP_OBJ entries are also displayed in capital letters, which helps in spotting those entries.
139 .TP
140 .I \-p, \-\-absolute-names
141 Do not strip leading slash characters (`/'). The default behavior is to
142 strip leading slash characters.
143 .TP
144 .I \-n, \-\-numeric
145 List numeric user and group IDs
146 .TP
147 .I \-v, \-\-version
148 Print the version of getfacl and exit.
149 .TP
150 .I \-h, \-\-help
151 Print help explaining the command line options.
152 .TP
153 .I \-\-
154 End of command line options. All remaining parameters are interpreted as file names, even if they start with a dash character.
155 .TP
156 .I \-
157 If the file name parameter is a single dash character, getfacl reads a list of files from standard input.
158
159 .SH CONFORMANCE TO POSIX 1003.1e DRAFT STANDARD 17
160 If the environment variable POSIXLY_CORRECT is defined, the default behavior of getfacl changes in the following ways: Unless otherwise specified, only the ACL is printed. The default ACL is only printed if the
161 .I \-d
162 option is given. If no command line parameter is given,
163 .I getfacl
164 behaves as if it was invoked as ``getfacl \-''.
165 No flags comments indicating the setuid, setgit, and sticky bits are generated.
166 .SH AUTHOR
167 Andreas Gruenbacher,
168 .RI < a.gruenbacher@bestbits.at >.
169
170 Please send your bug reports and comments to the above address.
171 .SH SEE ALSO
172 .BR setfacl "(1), " acl (5)