Skip to content

Ace

Immutable macOS extended access-control entry.

Unlike NFSv4 or POSIX.1e ACL entries, macOS resolves every principal (owning user, owning group, well-known accounts, or an arbitrary user/group) to a UUID before it reaches the file's ACL, so there is no separate qualifier enum: principal is always a uuid.Uuid.

The class methods below require a built uuid.Uuid, Mask, and Flags; use ace for UUID string or binary values and symbolic mask or flag coercion.

Example

let read = Mask(:READ_DATA:, :READ_ATTRIBUTES:)
Ace.allow $owner mask: $read flags: (Flags(:FILE_INHERIT:))

Class Methods

allow principal :mask … -> Ace

Constructs an entry that grants the permissions in mask.

Parameters

NameTypeDescription
principal uuid.Uuid The entry's principal.
:mask Mask Permission mask.
:flags? Flags Inheritance flags. Defaults to empty.

deny principal :mask … -> Ace

Constructs an entry that denies the permissions in mask.

Parameters

NameTypeDescription
principal uuid.Uuid The entry's principal.
:mask Mask Permission mask.
:flags? Flags Inheritance flags. Defaults to empty.

Fields

flags @ Flags

The entry's inheritance flags.

mask @ Mask

The entry's permission mask.

principal @ uuid.Uuid

The entry's principal.

type @ (:ALLOW: | :DENY:)

Entry type.