filesystem.set_zfs_attributes

Set special ZFS-related file flags (MS-DOS attributes and the BSD-style immutable/nounlink/appendonly flags) on the specified path.

Several of these flags are also surfaced elsewhere. The immutable flag appears as IMMUTABLE in the attributes of filesystem.stat output and as STATX_ATTR_IMMUTABLE in the statx() response; appendonly appears as APPEND in filesystem.stat output and as STATX_ATTR_APPEND in statx().

When recursion is requested, the path is treated as the root of a tree walk, and attributes are applied to descendants of the matching type. Recursion stops at dataset boundaries.

This method is a job.

Type: object

Type: array
No Additional Items

Tuple Validation

Parameter 1: set_zfs_file_attributes

set_zfs_file_attributes

Type: object

FilesystemSetZfsAttributesArgs parameters.

No Additional Properties

Path

Type: string

Path to the file or directory to set ZFS attributes on.

Must be at least 1 characters long

ZFSFileAttrsData

Type: object

ZFS file attributes to set.

No Additional Properties

Readonly

Default: null

READONLY MS-DOS attribute. When set, file may not be written to (toggling does not impact existing file opens).

Type: boolean
Type: null

Hidden

Default: null

HIDDEN MS-DOS attribute. When set, the SMB HIDDEN flag is set and file is "hidden" from the perspective of SMB clients.

Type: boolean
Type: null

System

Default: null

SYSTEM MS-DOS attribute. Is presented to SMB clients, but has no impact on local filesystem.

Type: boolean
Type: null

Archive

Default: null

ARCHIVE MS-DOS attribute. Value is reset to True whenever file is modified.

Type: boolean
Type: null

Immutable

Default: null

File may not be altered or deleted. Also appears as IMMUTABLE in attributes in filesystem.stat output and as STATXATTRIMMUTABLE in statx() response.

Type: boolean
Type: null

Appendonly

Default: null

File may only be opened with OAPPEND flag. Also appears as APPEND in attributes in filesystem.stat output and as STATXATTR_APPEND in statx() response.

Type: boolean
Type: null

Offline

Default: null

OFFLINE MS-DOS attribute. Is presented to SMB clients, but has no impact on local filesystem.

Type: boolean
Type: null

Sparse

Default: null

SPARSE MS-DOS attribute. Is presented to SMB clients, but has no impact on local filesystem.

Type: boolean
Type: null

FilesystemSetZfsAttributesOptions

Type: object Default: {"recursive": null}

Additional options including recursion behavior.

No Additional Properties

Recursive

Default: null

If set, walk the tree under path and apply attributes to entries whose type appears in the list (FILES, DIRECTORIES, or both). The root path is included only if its type matches the filter. null means no recursion (operate on path only). An empty list is rejected.

Type: array of enum (of string)
No Additional Items
Each item of this array must be:
Type: enum (of string)
Must be one of:
  • "FILES"
  • "DIRECTORIES"
Type: null

ZFSFileAttrsData

Type: object

The updated ZFS file attributes for the root path.

No Additional Properties

Readonly

Default: null

READONLY MS-DOS attribute. When set, file may not be written to (toggling does not impact existing file opens).

Type: boolean
Type: null

Hidden

Default: null

HIDDEN MS-DOS attribute. When set, the SMB HIDDEN flag is set and file is "hidden" from the perspective of SMB clients.

Type: boolean
Type: null

System

Default: null

SYSTEM MS-DOS attribute. Is presented to SMB clients, but has no impact on local filesystem.

Type: boolean
Type: null

Archive

Default: null

ARCHIVE MS-DOS attribute. Value is reset to True whenever file is modified.

Type: boolean
Type: null

Immutable

Default: null

File may not be altered or deleted. Also appears as IMMUTABLE in attributes in filesystem.stat output and as STATXATTRIMMUTABLE in statx() response.

Type: boolean
Type: null

Appendonly

Default: null

File may only be opened with OAPPEND flag. Also appears as APPEND in attributes in filesystem.stat output and as STATXATTR_APPEND in statx() response.

Type: boolean
Type: null

Offline

Default: null

OFFLINE MS-DOS attribute. Is presented to SMB clients, but has no impact on local filesystem.

Type: boolean
Type: null

Sparse

Default: null

SPARSE MS-DOS attribute. Is presented to SMB clients, but has no impact on local filesystem.

Type: boolean
Type: null


Required roles: FILESYSTEM_ATTRS_WRITE