setaclentry(3C)setaclentry(3C)NAMEsetaclentry(), fsetaclentry() - add, modify, or delete one entry in
file's access control list (ACL) (HFS File Systems only)
Both forms of this call add, modify, or delete one entry in a file's
access control list (ACL). and take a path name (path) or open file
descriptor (fd) and an entry identifier (uid, gid). They change the
indicated entry's access mode bits to the given value (mode), meanings
of which are defined in modes are represented as and Irrelevant bits in
mode values must be zero.
If the file's ACL does not have an entry for the given uid and gid, the
entry is created and added to the ACL. If mode is (defined in the
matching entry is deleted from the file's ACL if it is an optional
entry, or its mode bits are set to zero (no access) if it is a base
uid or gid can be or (defined in respectively, to represent non-spe‐
cific entries or The file's or base entries can be referred to using or
(defined in for the file's owner or group ID, respectively.
and read the file's ACL with or and modify it with or respectively.
If successful, and return zero.
If an error occurs, and return the following negative values and set
−1 Unable to perform or on the file. indicates the cause.
−2 Unable to perform or on the file. indicates the cause.
−3 Cannot add a new entry because the ACL already has (defined in
−4 Cannot delete a nonexisting entry.
−5 Unable to perform or on the file. indicates the cause.
The following code fragment adds an entry to file ``work/list'' for
user ID 115, group ID 32, or modifies the existing entry for that user
and group, if any, with a new access mode of read only. It also
changes the owner base entry to have all access rights, and deletes the
entry, if any, for any user in group 109.
HFS and are only supported on HFS file system on standard HP-UX
NFS and are not supported on remote files.
and were developed by HP.
SEE ALSOgetacl(2), setacl(2), stat(2), acltostr(3C), cpacl(3C), chownacl(3C),
strtoacl(3C), acl(5), thread_safety(5).