| ACL(9) | Kernel Developer's Manual | ACL(9) |
acl — virtual file
system access control lists
#include
<sys/param.h>
#include <sys/vnode.h>
#include <sys/acl.h>
In the kernel configuration file:
options UFS_ACL
Access control lists, or ACLs, allow fine-grained specification of rights for vnodes representing files and directories. However, as there are a plethora of file systems with differing ACL semantics, the vnode interface is aware only of the syntax of ACLs, relying on the underlying file system to implement the details. Depending on the underlying file system, each file or directory may have zero or more ACLs associated with it, named using the type field of the appropriate vnode ACL calls: VOP_ACLCHECK(9), VOP_GETACL(9), and VOP_SETACL(9).
Currently, each ACL is represented in-kernel by a fixed-size acl structure, defined as follows:
struct acl {
unsigned int acl_maxcnt;
unsigned int acl_cnt;
int acl_spare[4];
struct acl_entry acl_entry[ACL_MAX_ENTRIES];
};
An ACL is constructed from a fixed size array of ACL entries, each
of which consists of a set of permissions, principal namespace, and
principal identifier. In this implementation, the
acl_maxcnt field is always set to
ACL_MAX_ENTRIES.
Each individual ACL entry is of the type acl_entry_t, which is a structure with the following members:
ACL_UNDEFINED_FIELDACL_USER_OBJACL_USERACL_GROUP_OBJACL_GROUPACL_MASKACL_OTHERACL_OTHER_OBJACL_OTHER.ACL_EVERYONEEach POSIX.1e ACL must contain exactly one
ACL_USER_OBJ, one
ACL_GROUP_OBJ, and one
ACL_OTHER. If any of
ACL_USER, ACL_GROUP, or
ACL_OTHER are present, then exactly one
ACL_MASK entry should be present.
ACL_USER and
ACL_GROUP, this field should be set to
ACL_UNDEFINED_ID.ACL_EXECUTEACL_WRITEACL_READACL_PERM_NONEFor NFSv4 ACLs, the following are valid:
ACL_READ_DATAACL_LIST_DIRECTORYACL_READ_DATA.ACL_WRITE_DATAACL_ADD_FILEACL_ACL_WRITE_DATA.ACL_APPEND_DATAACL_ADD_SUBDIRECTORYACL_APPEND_DATA.ACL_READ_NAMED_ATTRSACL_WRITE_NAMED_ATTRSACL_EXECUTEACL_DELETE_CHILDACL_READ_ATTRIBUTESACL_WRITE_ATTRIBUTESACL_DELETEACL_READ_ACLACL_WRITE_ACLACL_WRITE_OWNERACL_SYNCHRONIZEACL_ENTRY_FILE_INHERITACL_ENTRY_DIRECTORY_INHERITACL_ENTRY_NO_PROPAGATE_INHERITACL_ENTRY_INHERIT_ONLYACL_ENTRY_INHERITEDACL_ENTRY_INHERITED flag is set on an ACE that
has been inherited from its parent. It may also be set programmatically,
and is valid on both files and directories.acl(3), vaccess(9), vaccess_acl_nfs4(9), vaccess_acl_posix1e(9), VFS(9), VOP_ACLCHECK(9), VOP_GETACL(9), VOP_SETACL(9)
This manual page was written by Robert Watson.
| September 4, 2015 | Debian |