The file whose name is given by
path or referenced by the descriptor
fd has its flags changed to
flags. For
lchflags(), symbolic links are not traversed and thus their modes may be changed with this call.
The flags specified are formed by
or'ing the following values:
UF_NODUMP
Do not dump the file.
UF_IMMUTABLE
The file may not be changed.
UF_APPEND
The file may only be appended to.
UF_OPAQUE
The file (if a directory) is opaque for union mounts.
SF_ARCHIVED
The file is archived.
SF_IMMUTABLE
The file may not be changed.
SF_APPEND
The file may only be appended to.
The
UF_NODUMP,
UF_IMMUTABLE,
UF_APPEND, and
UF_OPAQUE flags may be set or unset by either the owner of a file or the super-user, except on block and character devices, where only the super-user may set or unset them.
The
SF_ARCHIVED,
SF_IMMUTABLE, and
SF_APPEND flags may only be set or unset by the super-user. Attempts by the non-super-user to set the super-user only flags are silently ignored. These flags may be set at any time, but normally may only be unset when the system is in single-user mode. (See
init(8) for details.)