2 .\" Copyright (c) 1999-2001 Robert N. M. Watson
3 .\" All rights reserved.
5 .\" Redistribution and use in source and binary forms, with or without
6 .\" modification, are permitted provided that the following conditions
8 .\" 1. Redistributions of source code must retain the above copyright
9 .\" notice, this list of conditions and the following disclaimer.
10 .\" 2. Redistributions in binary form must reproduce the above copyright
11 .\" notice, this list of conditions and the following disclaimer in the
12 .\" documentation and/or other materials provided with the distribution.
14 .\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
15 .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
16 .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
17 .\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
18 .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
19 .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
20 .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
21 .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
22 .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
23 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
28 .Dd September 18, 2009
33 .Nd virtual file system access control lists
39 In the kernel configuration file:
42 Access control lists, or ACLs,
43 allow fine-grained specification of rights
44 for vnodes representing files and directories.
45 However, as there are a plethora of file systems with differing ACL semantics,
46 the vnode interface is aware only of the syntax of ACLs,
47 relying on the underlying file system to implement the details.
48 Depending on the underlying file system, each file or directory
49 may have zero or more ACLs associated with it, named using the
51 field of the appropriate vnode ACL calls:
57 Currently, each ACL is represented in-kernel by a fixed-size
59 structure, defined as follows:
60 .Bd -literal -offset indent
62 unsigned int acl_maxcnt;
65 struct acl_entry acl_entry[ACL_MAX_ENTRIES];
69 An ACL is constructed from a fixed size array of ACL entries,
70 each of which consists of a set of permissions, principal namespace,
71 and principal identifier.
72 In this implementation, the
74 field is always set to
77 Each individual ACL entry is of the type
79 which is a structure with the following members:
81 .It Vt acl_tag_t Va ae_tag
82 The following is a list of definitions of ACL types
86 .Bl -tag -width ".Dv ACL_UNDEFINED_FIELD" -offset indent -compact
87 .It Dv ACL_UNDEFINED_FIELD
90 Discretionary access rights for processes whose effective user ID
91 matches the user ID of the file's owner.
93 Discretionary access rights for processes whose effective user ID
94 matches the ACL entry qualifier.
96 Discretionary access rights for processes whose effective group ID
97 or any supplemental groups
98 match the group ID of the file's owner.
100 Discretionary access rights for processes whose effective group ID
101 or any supplemental groups
102 match the ACL entry qualifier.
104 The maximum discretionary access rights that can be granted
105 to a process in the file group class.
106 This is only valid for POSIX.1e ACLs.
108 Discretionary access rights for processes not covered by any other ACL
110 This is only valid for POSIX.1e ACLs.
115 Discretionary access rights for all users.
116 This is only valid for NFSv4 ACLs.
119 Each POSIX.1e ACL must contain exactly one
130 are present, then exactly one
132 entry should be present.
133 .It Vt uid_t Va ae_id
134 The ID of user for whom this ACL describes access permissions.
135 For entries other than
139 this field should be set to
140 .Dv ACL_UNDEFINED_ID .
141 .It Vt acl_perm_t Va ae_perm
142 This field defines what kind of access the process matching this ACL has
143 for accessing the associated file.
144 For POSIX.1e ACLs, the following are valid:
145 .Bl -tag -width ".Dv ACL_WRITE_NAMED_ATTRS"
147 The process may execute the associated file.
149 The process may write to the associated file.
151 The process may read from the associated file.
153 The process has no read, write or execute permissions
154 to the associated file.
157 For NFSv4 ACLs, the following are valid:
158 .Bl -tag -width ".Dv ACL_WRITE_NAMED_ATTRS"
160 The process may read from the associated file.
161 .It Dv ACL_LIST_DIRECTORY
164 .It Dv ACL_WRITE_DATA
165 The process may write to the associated file.
168 .Dv ACL_ACL_WRITE_DATA .
169 .It Dv ACL_APPEND_DATA
170 .It Dv ACL_ADD_SUBDIRECTORY
172 .Dv ACL_APPEND_DATA .
173 .It Dv ACL_READ_NAMED_ATTRS
175 .It Dv ACL_WRITE_NAMED_ATTRS
178 The process may execute the associated file.
179 .It Dv ACL_DELETE_CHILD
180 .It Dv ACL_READ_ATTRIBUTES
181 .It Dv ACL_WRITE_ATTRIBUTES
185 .It Dv ACL_WRITE_OWNER
186 .It Dv ACL_SYNCHRONIZE
189 .It Vt acl_entry_type_t Va ae_entry_type
190 This field defines the type of NFSv4 ACL entry.
191 It is not used with POSIX.1e ACLs.
192 The following values are valid:
193 .Bl -tag -width ".Dv ACL_WRITE_NAMED_ATTRS"
194 .It Dv ACL_ENTRY_TYPE_ALLOW
195 .It Dv ACL_ENTRY_TYPE_DENY
197 .It Vt acl_flag_t Va ae_flags
198 This field defines the inheritance flags of NFSv4 ACL entry.
199 It is not used with POSIX.1e ACLs.
200 The following values are valid:
201 .Bl -tag -width ".Dv ACL_ENTRY_DIRECTORY_INHERIT"
202 .It Dv ACL_ENTRY_FILE_INHERIT
203 .It Dv ACL_ENTRY_DIRECTORY_INHERIT
204 .It Dv ACL_ENTRY_NO_PROPAGATE_INHERIT
205 .It Dv ACL_ENTRY_INHERIT_ONLY
210 .Xr vaccess_acl_nfs4 9 ,
211 .Xr vaccess_acl_posix1e 9 ,
218 This manual page was written by