ACL(9)
π ACL(9) β virtual file system access control lists β¨
okay so this one's from the Kernel Developer's Manual, and it's literally the blueprint for how the kernel thinks about ACLs π no cap, it's giving very much "vnode interface but make it permissions".
πΈ NAME πΈ
acl β virtual file system access control lists
π SYNOPSIS π
#include <sys/param.h>
#include <sys/vnode.h>
#include <sys/acl.h>
And in the kernel configuration file:
options UFS_ACL
β¨ DESCRIPTION β¨
Access control lists, or ACLs, let you specify rights for vnodes representing files and directories in a very fine-grained way, bestie. π«Ά But β and this is the main character plot twist β there are so many file systems with wildly differing ACL semantics that the vnode interface only knows about the syntax of ACLs, and leaves all the details to the underlying file system. iykyk.
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. periodt.
Each individual ACL entry is of the type acl_entry_t, which is a structure with the following members:
π¦ acl_tag_t ae_tag π¦
Here's the full rundown of ACL types you can set in ae_tag, bestie:
ACL_UNDEFINED_FIELDβ Undefined ACL type. (the "idk her" of ACL types π)ACL_USER_OBJβ Discretionary access rights for processes whose effective user ID matches the user ID of the file's owner.ACL_USERβ Discretionary access rights for processes whose effective user ID matches the ACL entry qualifier.ACL_GROUP_OBJβ Discretionary access rights for processes whose effective group ID or any supplemental groups match the group ID of the file's owner.ACL_GROUPβ Discretionary access rights for processes whose effective group ID or any supplemental groups match the ACL entry qualifier.ACL_MASKβ The maximum discretionary access rights that can be granted to a process in the file group class. This is only valid for POSIX.1e ACLs.ACL_OTHERβ Discretionary access rights for processes not covered by any other ACL entry. This is only valid for POSIX.1e ACLs.ACL_OTHER_OBJβ Same asACL_OTHER.ACL_EVERYONEβ Discretionary access rights for all users. This is only valid for NFSv4 ACLs.
Every POSIX.1e ACL must contain exactly oneACL_USER_OBJ, oneACL_GROUP_OBJ, and oneACL_OTHER. If any ofACL_USER,ACL_GROUP, orACL_OTHERare present, then exactly oneACL_MASKentry should be present. not me being strict about it, that's just the rules π
π uid_t ae_id π
The ID of user for whom this ACL describes access permissions. For entries other than ACL_USER and ACL_GROUP, this field should be set to ACL_UNDEFINED_ID.
π acl_perm_t ae_perm π
This field defines what kind of access the process matching this ACL has for accessing the associated file.
For POSIX.1e ACLs, the following are valid:
ACL_EXECUTEβ The process may execute the associated file.ACL_WRITEβ The process may write to the associated file.ACL_READβ The process may read from the associated file.ACL_PERM_NONEβ The process has no read, write or execute permissions to the associated file. π
For NFSv4 ACLs, the following are valid:
ACL_READ_DATAβ The process may read from the associated file.ACL_LIST_DIRECTORYβ Same asACL_READ_DATA.ACL_WRITE_DATAβ The process may write to the associated file.ACL_ADD_FILEβ Same asACL_ACL_WRITE_DATA.ACL_APPEND_DATAACL_ADD_SUBDIRECTORYβ Same asACL_APPEND_DATA.ACL_READ_NAMED_ATTRSβ Ignored.ACL_WRITE_NAMED_ATTRSβ Ignored.ACL_EXECUTEβ The process may execute the associated file.ACL_DELETE_CHILDACL_READ_ATTRIBUTESACL_WRITE_ATTRIBUTESACL_DELETEACL_READ_ACLACL_WRITE_ACLACL_WRITE_OWNERACL_SYNCHRONIZEβ Ignored.
π§ acl_entry_type_t ae_entry_type π§
This field defines the type of NFSv4 ACL entry. It is not used with POSIX.1e ACLs. The following values are valid:
ACL_ENTRY_TYPE_ALLOWACL_ENTRY_TYPE_DENY
π acl_flag_t ae_flags π
This field defines the inheritance flags of NFSv4 ACL entry. It is not used with POSIX.1e ACLs. The following values are valid:
ACL_ENTRY_FILE_INHERITACL_ENTRY_DIRECTORY_INHERITACL_ENTRY_NO_PROPAGATE_INHERITACL_ENTRY_INHERIT_ONLYACL_ENTRY_INHERITEDβ TheACL_ENTRY_INHERITEDflag 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.
π SEE ALSO π
acl(3), vaccess(9), vaccess_acl_nfs4(9), vaccess_acl_posix1e(9), VFS(9), VOP_ACLCHECK(9), VOP_GETACL(9), VOP_SETACL(9)
go read those too bestie, they're all part of the same little universe π«Άβ¨
π AUTHORS π
This manual page was written by Robert Watson. π
and that's the whole thing, no notes πΈ this page came from Debian, dated September 4, 2015 β shoutout to the icon who shipped it. slay, bye πππ¦
π¦ where this page comes from
- debian bookworm: freebsd-manpages 12.2-1 Β· BSD-2-Clause-FreeBSD AND BSD-4-Clause
- debian trixie: freebsd-manpages 12.2-2 Β· BSD-2-Clause-FreeBSD AND BSD-4-Clause
- ubuntu jammy: freebsd-manpages 12.2-1 Β· BSD-2-Clause-FreeBSD AND BSD-4-Clause
- ubuntu noble: freebsd-manpages 12.2-1 Β· BSD-2-Clause-FreeBSD AND BSD-4-Clause
- ubuntu questing: freebsd-manpages 12.2-2
- ubuntu resolute: freebsd-manpages 12.2-2build1 Β· BSD-2-Clause-FreeBSD AND BSD-4-Clause
- ubuntu stonking: freebsd-manpages 12.2-2build1 Β· BSD-2-Clause-FreeBSD AND BSD-4-Clause
- Copyright (c) 1999-2001 Robert N. M. Watson
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms