filesystem.set_zfs_attributes¶
Set special ZFS-related file flags on the specified path.
readonly - READONLY MS-DOS attribute. When set, file may not be written to (toggling does not impact existing file opens).
hidden - HIDDEN MS-DOS attribute. When set, the SMB HIDDEN flag is set and file is “hidden” from the perspective of SMB clients.
system - SYSTEM MS-DOS attribute. Is presented to SMB clients, but has no impact on local filesystem.
archive - ARCHIVE MS-DOS attribute. Value is reset to True whenever file is modified.
immutable - file may not be altered or deleted. Also appears as IMMUTABLE in attributes in filesystem.stat output and as STATX_ATTR_IMMUTABLE in statx().
nounlink - file may be altered but not deleted.
appendonly - file may only be opened with O_APPEND flag. Also appears as APPEND in attributes in filesystem.stat output and as STATX_ATTR_APPEND in statx() response.
offline - OFFLINE MS-DOS attribute. Is presented to SMB clients, but has no impact on local filesystem.
sparse - SPARSE MS-DOS attribute. Is presented to SMB clients, but has no impact on local filesystem.
options.recursive - if set to a non-empty list of FILES/DIRECTORIES, the path is treated as the root of a tree walk and attributes are applied to descendants of the matching type. The root path itself is included only if its type matches the filter. null (the default) preserves the legacy single-path behavior. Recursion stops at dataset boundaries.
This method is a job.
No Additional Items
Tuple Validation
Parameter 1: set_zfs_file_attributes
set_zfs_file_attributes
Type: objectFilesystemSetZfsAttributesArgs parameters.
No Additional PropertiesPath
Type: stringPath to the file to set ZFS attributes on.
Must be at least 1 characters long
ZFSFileAttrsData
Type: objectZFS file attributes to set.
No Additional PropertiesReadonly
Default: nullREADONLY MS-DOS attribute. When set, file may not be written to (toggling does not impact existing file opens).
System
Default: nullSYSTEM MS-DOS attribute. Is presented to SMB clients, but has no impact on local filesystem.
Archive
Default: nullARCHIVE MS-DOS attribute. Value is reset to True whenever file is modified.
Immutable
Default: nullFile may not be altered or deleted. Also appears as IMMUTABLE in attributes in filesystem.stat output and as STATXATTRIMMUTABLE in statx() response.
Nounlink
Default: nullFile may be altered but not deleted.
Appendonly
Default: nullFile may only be opened with OAPPEND flag. Also appears as APPEND in attributes in filesystem.stat output and as STATXATTR_APPEND in statx() response.
Offline
Default: nullOFFLINE MS-DOS attribute. Is presented to SMB clients, but has no impact on local filesystem.
Sparse
Default: nullSPARSE MS-DOS attribute. Is presented to SMB clients, but has no impact on local filesystem.
ZFSFileAttrsData
Type: objectThe updated ZFS file attributes.
No Additional PropertiesReadonly
Default: nullREADONLY MS-DOS attribute. When set, file may not be written to (toggling does not impact existing file opens).
System
Default: nullSYSTEM MS-DOS attribute. Is presented to SMB clients, but has no impact on local filesystem.
Archive
Default: nullARCHIVE MS-DOS attribute. Value is reset to True whenever file is modified.
Immutable
Default: nullFile may not be altered or deleted. Also appears as IMMUTABLE in attributes in filesystem.stat output and as STATXATTRIMMUTABLE in statx() response.
Nounlink
Default: nullFile may be altered but not deleted.
Appendonly
Default: nullFile may only be opened with OAPPEND flag. Also appears as APPEND in attributes in filesystem.stat output and as STATXATTR_APPEND in statx() response.
Offline
Default: nullOFFLINE MS-DOS attribute. Is presented to SMB clients, but has no impact on local filesystem.
Sparse
Default: nullSPARSE MS-DOS attribute. Is presented to SMB clients, but has no impact on local filesystem.
Required roles: FILESYSTEM_ATTRS_WRITE