filesystem.setacl

Set the ACL of a given path.

The dacl entry formatting depends on the underlying acltype: an NFS4 ACL requires NFSv4 entries, while a POSIX1E ACL requires POSIX1e entries. When stripacl is set, the ACL is converted to a trivial ACL; an ACL is trivial if it can be expressed as a file mode without losing any access rules.

Note

For each owner change, set one and only one of uid or user (and likewise one of gid or group), and only if the caller wishes to change the owning user or group of the file or 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.

The following notes about ACL entries are necessarily terse. If more detail is required, please consult relevant TrueNAS documentation.

NFSv4 ACL entry semantics

The tag identifies the principal to whom the entry applies. USER and GROUP have conventional meanings: owner@ refers to the owning user of the file, group@ to the owning group, and everyone@ to all users (including the owning user and group). The type may be ALLOW or DENY, and DENY entries take precedence over ALLOW when the ACL is evaluated. The flags inheritance flags determine how an entry is presented (if at all) on newly-created files or directories within the specified path and are only valid for directories.

POSIX1e ACL entry semantics

When default is true, the entry belongs to the POSIX default ACL and is copied to new files and directories created within the directory where it is set; default entries are not evaluated when determining access to the file on which they are set. When default is false, the entry applies to the POSIX access ACL which is used to determine access to the directory but is not inherited.

For the tag, USER_OBJ refers to the owning user (denoted “user” in conventional POSIX UGO permissions), GROUP_OBJ refers to the owning group (denoted “group”), and OTHER applies to all users and groups who are not USER_OBJ or GROUP_OBJ. MASK sets the maximum permissions granted to all USER and GROUP entries. A valid POSIX1e ACL contains precisely one USER_OBJ, GROUP_OBJ, OTHER, and MASK entry for each of the default and access lists.

This method is a job.

Type: object

Type: array
No Additional Items

Tuple Validation

Parameter 1: filesystem_acl

filesystem_acl

Type: object

FilesystemSetaclArgs parameters.

No Additional Properties

Path

Type: string

Must be at least 1 characters long

Dacl


Type: array of object
No Additional Items
Each item of this array must be:

NFS4ACE

Type: object
No 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: object
No Additional Properties

Read Data

Type: boolean Default: false

Write Data

Type: boolean Default: false

Append Data

Type: boolean Default: false

Read Named Attrs

Type: boolean Default: false

Write Named Attrs

Type: boolean Default: false

Execute

Type: boolean Default: false

Delete

Type: boolean Default: false

Delete Child

Type: boolean Default: false

Read Attributes

Type: boolean Default: false

Write Attributes

Type: boolean Default: false

Read Acl

Type: boolean Default: false

Write Acl

Type: boolean Default: false

Write Owner

Type: boolean Default: false

Synchronize

Type: boolean Default: false

NFS4ACE_BasicPerms

Type: object
No Additional Properties

Basic

Type: enum (of string)
Must be one of:
  • "FULL_CONTROL"
  • "MODIFY"
  • "READ"
  • "TRAVERSE"

Flags


NFS4ACE_AdvancedFlags

Type: object
No Additional Properties

File Inherit

Type: boolean Default: false

Directory Inherit

Type: boolean Default: false

No Propagate Inherit

Type: boolean Default: false

Inherit Only

Type: boolean Default: false

Inherited

Type: boolean Default: false

NFS4ACE_BasicFlags

Type: object
No Additional Properties

Basic

Type: enum (of string)
Must be one of:
  • "INHERIT"
  • "NOINHERIT"

Id

Default: null

Type: integer

Value must be greater or equal to -1 and lesser or equal to 2147483647

Type: null

Who

Default: null

Type: string
Type: string

Must be at least 1 characters long

Type: null
Type: array of object
No Additional Items
Each item of this array must be:

POSIXACE

Type: object
No Additional Properties

Tag

Type: enum (of string)
Must be one of:
  • "USER_OBJ"
  • "GROUP_OBJ"
  • "OTHER"
  • "MASK"
  • "USER"
  • "GROUP"

POSIXACE_Perms

Type: object
No Additional Properties

Read

Type: boolean

Write

Type: boolean

Execute

Type: boolean

Default

Type: boolean

Id

Default: null

Type: integer

Value must be greater or equal to -1 and lesser or equal to 2147483647

Type: null

Who

Default: null

Type: string
Type: string

Must be at least 1 characters long

Type: null

FilesystemSetAclOptions

Type: object
Default:
{ "stripacl": false, "recursive": false, "traverse": false, "canonicalize": true, "validate_effective_acl": true }

No Additional Properties

Stripacl

Type: boolean Default: false

Recursive

Type: boolean Default: false

Traverse

Type: boolean Default: false

Canonicalize

Type: boolean Default: true

Validate Effective Acl

Type: boolean Default: true

NFS4ACL_Flags

Type: object
Default:
{ "autoinherit": false, "protected": false, "defaulted": false }

No Additional Properties

Autoinherit

Type: boolean Default: false

Protected

Type: boolean Default: false

Defaulted

Type: boolean Default: false

Uid

Default: -1

Type: integer

Value must be greater or equal to -1 and lesser or equal to 2147483647

Type: null

User

Default: null

Type: string
Type: null

Gid

Default: -1

Type: integer

Value must be greater or equal to -1 and lesser or equal to 2147483647

Type: null

Group

Default: null

Type: string
Type: null

Acltype

Default: null

Type: enum (of string)
Must be one of:
  • "NFS4"
  • "POSIX1E"
Type: null

Result


NFS4ACLResult

Type: object
No Additional Properties

Path

Type: string

Must be at least 1 characters long

User


Type: string

Must be at least 1 characters long

Type: null

Group


Type: string

Must be at least 1 characters long

Type: null

Uid


Type: integer

Value must be greater or equal to -1 and lesser or equal to 2147483647

Type: null

Gid


Type: integer

Value must be greater or equal to -1 and lesser or equal to 2147483647

Type: null

Acltype

Type: const
Specific value: "NFS4"

Acl

Type: array of object
No Additional Items
Each item of this array must be:

NFS4ACE

Type: object
No 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: object
No Additional Properties

Read Data

Type: boolean Default: false

Write Data

Type: boolean Default: false

Append Data

Type: boolean Default: false

Read Named Attrs

Type: boolean Default: false

Write Named Attrs

Type: boolean Default: false

Execute

Type: boolean Default: false

Delete

Type: boolean Default: false

Delete Child

Type: boolean Default: false

Read Attributes

Type: boolean Default: false

Write Attributes

Type: boolean Default: false

Read Acl

Type: boolean Default: false

Write Acl

Type: boolean Default: false

Write Owner

Type: boolean Default: false

Synchronize

Type: boolean Default: false

NFS4ACE_BasicPerms

Type: object
No Additional Properties

Basic

Type: enum (of string)
Must be one of:
  • "FULL_CONTROL"
  • "MODIFY"
  • "READ"
  • "TRAVERSE"

Flags


NFS4ACE_AdvancedFlags

Type: object
No Additional Properties

File Inherit

Type: boolean Default: false

Directory Inherit

Type: boolean Default: false

No Propagate Inherit

Type: boolean Default: false

Inherit Only

Type: boolean Default: false

Inherited

Type: boolean Default: false

NFS4ACE_BasicFlags

Type: object
No Additional Properties

Basic

Type: enum (of string)
Must be one of:
  • "INHERIT"
  • "NOINHERIT"

Id

Default: null

Type: integer

Value must be greater or equal to -1 and lesser or equal to 2147483647

Type: null

Who

Default: null

Type: string
Type: string

Must be at least 1 characters long

Type: null

NFS4ACL_Flags

Type: object
No Additional Properties

Autoinherit

Type: boolean Default: false

Protected

Type: boolean Default: false

Defaulted

Type: boolean Default: false

Trivial

Type: boolean

POSIXACLResult

Type: object
No Additional Properties

Path

Type: string

Must be at least 1 characters long

User


Type: string

Must be at least 1 characters long

Type: null

Group


Type: string

Must be at least 1 characters long

Type: null

Uid


Type: integer

Value must be greater or equal to -1 and lesser or equal to 2147483647

Type: null

Gid


Type: integer

Value must be greater or equal to -1 and lesser or equal to 2147483647

Type: null

Acltype

Type: const
Specific value: "POSIX1E"

Acl

Type: array of object
No Additional Items
Each item of this array must be:

POSIXACE

Type: object
No Additional Properties

Tag

Type: enum (of string)
Must be one of:
  • "USER_OBJ"
  • "GROUP_OBJ"
  • "OTHER"
  • "MASK"
  • "USER"
  • "GROUP"

POSIXACE_Perms

Type: object
No Additional Properties

Read

Type: boolean

Write

Type: boolean

Execute

Type: boolean

Default

Type: boolean

Id

Default: null

Type: integer

Value must be greater or equal to -1 and lesser or equal to 2147483647

Type: null

Who

Default: null

Type: string
Type: string

Must be at least 1 characters long

Type: null

Trivial

Type: boolean

DISABLED_ACLResult

Type: object
No Additional Properties

Path

Type: string

Must be at least 1 characters long

User


Type: string

Must be at least 1 characters long

Type: null

Group


Type: string

Must be at least 1 characters long

Type: null

Uid


Type: integer

Value must be greater or equal to -1 and lesser or equal to 2147483647

Type: null

Gid


Type: integer

Value must be greater or equal to -1 and lesser or equal to 2147483647

Type: null

Acltype

Type: const
Specific value: "DISABLED"

Acl

Type: null

Trivial

Type: const
Specific value: true


Required roles: FILESYSTEM_ATTRS_WRITE