acl.2 (2010 09)

a
acl(2) acl(2)
If the ACL contains no entries of type
USER and no entries of type GROUP, then the entries of type
GROUP_OBJ and CLASS_OBJ have the same permissions.
If the ACL contains no entries of type
DEF_USER and no entries of type DEF_GROUP, and an entry
of type
DEF_GROUP_OBJ
is specified, then an entry of type DEF_CLASS_OBJ
is also specified and
the two entries have the same permissions.
Security Restrictions
The
ACL_SET value for cmd can only be executed by a process that has an effective user ID equal to the
owner of the file, or by the superuser, or by a user with the
OWNER privilege.
See privileges (5) for more information about privileged access on systems that support fine-grained
privileges.
RETURN VALUE
acl() returns the following values:
n Successful completion. Returns the number of ACL entries for cmd
ACL_CNT and ACL_GET.
0 Successful completion. Returns 0 for cmd ACL_SET
.
-1 Failure.
errno is set to indicate the error.
ERRORS
If
acl() fails, the ACL is unchanged, and errno is set to one of the following values:
[EACCES] The caller does not have access to a component of the path name.
[EINVAL] cmd is not
ACL_GET, ACL_SET,orACL_CNT
.
[EINVAL] cmd is
ACL_SET and nentries is less than the number of mandatory ACL entries (4).
[EINVAL] cmd is
ACL_SET and the ACL specified in aclbufp is not valid [see above discussion, and
aclsort (3C)].
[EIO] A disk I/O error has occurred while storing or retrieving the ACL.
[EPERM] cmd is
ACL_SET and the effective user ID of the caller does not match the owner of the
file, and the caller is not the superuser or a user with OWNER privilege.
[ENOENT] A component of the path does not exist.
[ENOSPC] cmd is
ACL_GET and nentries is less than the number of entries in the files ACL.
[ENOSPC] cmd is
ACL_SET and there is insufficient space to store the ACL.
[ENOSPC] cmd is
ACL_SET and nentries is greater than NACLVENTRIES, which is defined in
<sys/aclv.h>.
[ENOTDIR] A component of the path specified by pathp is not a directory.
[ENOTDIR] cmd is
ACL_SET and an attempt is made to set a default ACL on a file type other than a
directory.
[ENOSYS] cmd is
ACL_SET, the file specified by pathp resides on a local non-JFS file system, and
additional entries were specified in the ACL.
[EOPNOTSUPP]
cmd is
ACL_SET, the file specified by pathp resides on a non-local file system, and addi-
tional entries were specified in the ACL.
[EROFS] cmd is
ACL_SET and the file specified by pathp resides on a file system that is mounted
read-only.
[EFAULT] aclbufp points to an illegal address.
SEE ALSO
aclsort(3), getacl(1), setacl(1), privileges(5).
2 Hewlett-Packard Company 2 HP-UX 11i Version 3: September 2010