filesystem.setacl¶
Set ACL of a given path. Takes the following parameters: path full path to directory or file.
dacl ACL entries. Formatting depends on the underlying acltype. NFS4ACL requires NFSv4 entries. POSIX1e requires POSIX1e entries.
uid the desired UID of the file user. If set to None (the default), then user is not changed.
user the desired username for the file user. If set to None, then user is not changed.
Note about interaction between uid and user: One and only one of these parameters should be set, and _only_ if the API consumer wishes to change the owner on the file / directory.
gid the desired GID of the file group. If set to None (the default), then group is not changed.
group the desired groupname for the file group. If set to None (the default), then group is not changed.
Note about interaction between gid and group: One and only one of these parameters should be set, and _only_ if the API consumer wishes to change the owner on the file / directory.
WARNING: if user, uid, group, or gid is specified in a recursive operation then the owning user, group, or both for _all_ files will be changed.
recursive apply the ACL recursively
traverse traverse filestem boundaries (ZFS datasets)
strip convert ACL to trivial. ACL is trivial if it can be expressed as a file mode without losing any access rules.
canonicalize reorder ACL entries so that they are in concanical form as described in the Microsoft documentation MS-DTYP 2.4.5 (ACL). This only applies to NFSv4 ACLs.
The following notes about ACL entries are necessarily terse. If more detail is requried please consult relevant TrueNAS documentation.
Notes about NFSv4 ACL entry fields:
tag refers to the type of principal to whom the ACL entries applies. USER and GROUP have conventional meanings. owner@ refers to the owning user of the file, group@ refers to the owning group of the file, and everyone@ refers to ALL users (including the owning user and group)..
id refers to the numeric user id or group id associatiated with USER or GROUP entries.
who a user or group name may be specified in lieu of numeric ID for USER or GROUP entries
type may be ALLOW or DENY. Deny entries take precedence over allow when the ACL is evaluated.
perms permissions allowed or denied by the entry. May be set as a simlified BASIC type or more complex type detailing specific permissions.
flags inheritance flags determine how this entry will be presented (if at all) on newly-created files or directories within the specified path. Only valid for directories.
Notes about posix1e ACL entry fields:
default the ACL entry is in the posix default ACL (will be copied to new files and directories) created within the directory where it is set. These are _NOT_ evaluated when determining access for the file on which they’re set. If default is false then the entry applies to the posix access ACL, which is used to determine access to the directory, but is not inherited on new files / directories.
tag the type of principal to whom the ACL entry apples. USER and GROUP have conventional meanings USER_OBJ refers to the owning user of the file and is also denoted by “user” in conventional POSIX UGO permissions. GROUP_OBJ refers to the owning group of the file and is denoted by “group” in the same. OTHER refers to POSIX other, which applies to all users and groups who are not USER_OBJ or GROUP_OBJ. MASK sets maximum permissions granted to all USER and GROUP entries. A valid POSIX1 ACL entry contains precisely one USER_OBJ, GROUP_OBJ, OTHER, and MASK entry for the default and access list.
id refers to the numeric user id or group id associatiated with USER or GROUP entries.
who a user or group name may be specified in lieu of numeric ID for USER or GROUP entries
perms - object containing posix permissions.
No Additional Items
Tuple Validation
Parameter 1: filesystem_acl
filesystem_acl
Type: objectNo Additional Properties
Path
Type: stringMust be at least 1
characters long
Dacl
No Additional Items
Each item of this array must be:
NFS4ACE
Type: objectNo Additional Properties
Tag
Type: enum (of string)Must be one of:
- "owner@"
- "group@"
- "everyone@"
- "USER"
- "GROUP"
Type
Type: enum (of string)Must be one of:
- "ALLOW"
- "DENY"
Perms
NFS4ACE_AdvancedPerms
Type: objectNo Additional Properties
Read Data
Type: boolean Default: falseWrite Data
Type: boolean Default: falseAppend Data
Type: boolean Default: falseRead Named Attrs
Type: boolean Default: falseWrite Named Attrs
Type: boolean Default: falseExecute
Type: boolean Default: falseDelete
Type: boolean Default: falseDelete Child
Type: boolean Default: falseRead Attributes
Type: boolean Default: falseWrite Attributes
Type: boolean Default: falseRead Acl
Type: boolean Default: falseWrite Acl
Type: boolean Default: falseWrite Owner
Type: boolean Default: falseSynchronize
Type: boolean Default: falseNFS4ACE_BasicPerms
Type: objectNo Additional Properties
Basic
Type: enum (of string)Must be one of:
- "FULL_CONTROL"
- "MODIFY"
- "READ"
- "TRAVERSE"
Flags
NFS4ACE_AdvancedFlags
Type: objectNo Additional Properties
File Inherit
Type: boolean Default: falseDirectory Inherit
Type: boolean Default: falseNo Propagate Inherit
Type: boolean Default: falseInherit Only
Type: boolean Default: falseInherited
Type: boolean Default: falseNFS4ACE_BasicFlags
Type: objectNo Additional Properties
Basic
Type: enum (of string)Must be one of:
- "INHERIT"
- "NOINHERIT"
Id
Default: nullValue must be greater or equal to -1
and lesser or equal to 2147483647
Who
Default: nullMust be at least 1
characters long
No Additional Items
Each item of this array must be:
POSIXACE
Type: objectNo Additional Properties
Tag
Type: enum (of string)Must be one of:
- "USER_OBJ"
- "GROUP_OBJ"
- "OTHER"
- "MASK"
- "USER"
- "GROUP"
POSIXACE_Perms
Type: objectNo Additional Properties
Read
Type: booleanWrite
Type: booleanExecute
Type: booleanDefault
Type: booleanId
Default: nullValue must be greater or equal to -1
and lesser or equal to 2147483647
Who
Default: nullMust be at least 1
characters long
FilesystemSetAclOptions
Type: objectNo Additional Properties
Stripacl
Type: boolean Default: falseRecursive
Type: boolean Default: falseTraverse
Type: boolean Default: falseCanonicalize
Type: boolean Default: trueValidate Effective Acl
Type: boolean Default: trueNFS4ACL_Flags
Type: objectNo Additional Properties
Autoinherit
Type: boolean Default: falseProtected
Type: boolean Default: falseDefaulted
Type: boolean Default: falseUid
Default: -1Value must be greater or equal to -1
and lesser or equal to 2147483647
User
Default: nullGid
Default: -1Value must be greater or equal to -1
and lesser or equal to 2147483647
Group
Default: nullAcltype
Default: nullMust be one of:
- "NFS4"
- "POSIX1E"
Result
NFS4ACLResult
Type: objectNo Additional Properties
Path
Type: stringMust be at least 1
characters long
User
Must be at least 1
characters long
Group
Must be at least 1
characters long
Uid
Value must be greater or equal to -1
and lesser or equal to 2147483647
Gid
Value must be greater or equal to -1
and lesser or equal to 2147483647
Acltype
Type: constMust be one of:
- "NFS4"
"NFS4"
Acl
Type: array of objectNo Additional Items
Each item of this array must be:
NFS4ACE
Type: objectNo Additional Properties
Tag
Type: enum (of string)Must be one of:
- "owner@"
- "group@"
- "everyone@"
- "USER"
- "GROUP"
Type
Type: enum (of string)Must be one of:
- "ALLOW"
- "DENY"
Perms
NFS4ACE_AdvancedPerms
Type: objectNo Additional Properties
Read Data
Type: boolean Default: falseWrite Data
Type: boolean Default: falseAppend Data
Type: boolean Default: falseRead Named Attrs
Type: boolean Default: falseWrite Named Attrs
Type: boolean Default: falseExecute
Type: boolean Default: falseDelete
Type: boolean Default: falseDelete Child
Type: boolean Default: falseRead Attributes
Type: boolean Default: falseWrite Attributes
Type: boolean Default: falseRead Acl
Type: boolean Default: falseWrite Acl
Type: boolean Default: falseWrite Owner
Type: boolean Default: falseSynchronize
Type: boolean Default: falseNFS4ACE_BasicPerms
Type: objectNo Additional Properties
Basic
Type: enum (of string)Must be one of:
- "FULL_CONTROL"
- "MODIFY"
- "READ"
- "TRAVERSE"
Flags
NFS4ACE_AdvancedFlags
Type: objectNo Additional Properties
File Inherit
Type: boolean Default: falseDirectory Inherit
Type: boolean Default: falseNo Propagate Inherit
Type: boolean Default: falseInherit Only
Type: boolean Default: falseInherited
Type: boolean Default: falseNFS4ACE_BasicFlags
Type: objectNo Additional Properties
Basic
Type: enum (of string)Must be one of:
- "INHERIT"
- "NOINHERIT"
Id
Default: nullValue must be greater or equal to -1
and lesser or equal to 2147483647
Who
Default: nullMust be at least 1
characters long
NFS4ACL_Flags
Type: objectNo Additional Properties
Autoinherit
Type: boolean Default: falseProtected
Type: boolean Default: falseDefaulted
Type: boolean Default: falseTrivial
Type: booleanPOSIXACLResult
Type: objectNo Additional Properties
Path
Type: stringMust be at least 1
characters long
User
Must be at least 1
characters long
Group
Must be at least 1
characters long
Uid
Value must be greater or equal to -1
and lesser or equal to 2147483647
Gid
Value must be greater or equal to -1
and lesser or equal to 2147483647
Acltype
Type: constMust be one of:
- "POSIX1E"
"POSIX1E"
Acl
Type: array of objectNo Additional Items
Each item of this array must be:
POSIXACE
Type: objectNo Additional Properties
Tag
Type: enum (of string)Must be one of:
- "USER_OBJ"
- "GROUP_OBJ"
- "OTHER"
- "MASK"
- "USER"
- "GROUP"
POSIXACE_Perms
Type: objectNo Additional Properties
Read
Type: booleanWrite
Type: booleanExecute
Type: booleanDefault
Type: booleanId
Default: nullValue must be greater or equal to -1
and lesser or equal to 2147483647
Who
Default: nullMust be at least 1
characters long
Trivial
Type: booleanDISABLED_ACLResult
Type: objectNo Additional Properties
Path
Type: stringMust be at least 1
characters long
User
Must be at least 1
characters long
Group
Must be at least 1
characters long
Uid
Value must be greater or equal to -1
and lesser or equal to 2147483647
Gid
Value must be greater or equal to -1
and lesser or equal to 2147483647
Acltype
Type: constMust be one of:
- "DISABLED"
"DISABLED"
Acl
Type: constMust be one of:
- null
{ "description": "😅 ERROR in schema generation, a referenced schema could not be loaded, no documentation here unfortunately 🏜️" }
Trivial
Type: constMust be one of:
- true
true
Required roles: FILESYSTEM_ATTRS_WRITE