Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

fsetaclentr(3c) [hpux man page]

setaclentry(3C) 														   setaclentry(3C)

NAME
setaclentry(), fsetaclentry() - add, modify, or delete one entry in file's access control list (ACL) (HFS File Systems only) SYNOPSIS
DESCRIPTION
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 entry. uid or gid can be or (defined in respectively, to represent non-specific 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. RETURN VALUE
If successful, and return zero. ERRORS
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 entries. -4 Cannot delete a nonexisting entry. -5 Unable to perform or on the file. indicates the cause. EXAMPLES
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. DEPENDENCIES
HFS and are only supported on HFS file system on standard HP-UX operating system. NFS and are not supported on remote files. AUTHOR
and were developed by HP. SEE ALSO
getacl(2), setacl(2), stat(2), acltostr(3C), cpacl(3C), chownacl(3C), strtoacl(3C), acl(5), thread_safety(5). setaclentry(3C)

Check Out this Related Man Page

cpacl(3C)																 cpacl(3C)

NAME
cpacl(), fcpacl() - copy the access control list (ACL) and mode bits from one file to another (HFS and JFS File Systems only) SYNOPSIS
Remarks To ensure continued conformance with emerging industry standards, features described in this manual entry are likely to change in a future release. DESCRIPTION
Both (HFS and JFS file systems) and (HFS file systems only) copy the access control list and mode bits (that is, file access permission bits and miscellaneous mode bits; see chmod(2)) from one file to another, and transfer ownership much like chown(2). can only copy HFS ACLs to other HFS files and JFS ACLS to other JFS files; it does not covert HFS ACLs to JFS ACLs or vice versa. and take the following parameters: o Path names (fromfile and tofile) or open file descriptors (fromfd and tofd). o A mode value (frommode, typically the value returned by - see stat(2)) containing file miscellaneous mode bits which are always copied, and file access permission bits which are copied instead of the access control list if either file is remote. o User ID and group ID of the file (fromuid, touid and fromgid, togid) for transferring ownership. (Typically fromuid and fromgid are the and values returned by and touid and togid are the return values from and - see geteuid(2) and getegid(2) in getuid(2)). When both files are local, the routines copy the access control list and call (HFS only; see chownacl(3C)) to transfer ownership from the fromfile to the tofile, if necessary. handles remote copying (via NFS) and copying from HFS to JFS or vice versa after recognizing failures of or (see acl(2) and setacl(2)). When copying the mode from fromfile (fromfd) to tofile (tofd), copies the entire frommode (that is, the file miscellaneous mode bits and the file access permission bits) to tofile (tofd) using Some of the miscellaneous mode bits can be turned off; see chmod(2). can copy an access control list from fromfile (fromfd) to tofile (tofd) without transferring ownership, but ensuring error checking and handling of remote files. This is done by passing fromuid equal to touid and fromgid equal to togid (that is, four zeros). For remote files, fromuid, touid, fromgid, and togid are ignored. RETURN VALUE
If successful, and return zero. If an error occurs, they set to indicate the cause of failure and return a negative value, as follows: -1 Unable to perform or on a local fromfile (fromfd). -2 Unable to perform on tofile (tofd) to set its file miscellaneous mode bits. attempts this regardless of whether a file is local or remote, as long as fromfile (fromfd) is local. -3 Unable to perform or on a local tofile (tofd). As a consequence, the file's optional ACL entries are deleted (HFS only), its file access permission bits are zeroed, and its miscellaneous mode bits might be altered. -4 Unable to perform on tofile (tofd) to set its mode. As a consequence, if fromfile (fromfd) is local, tofile's (tofd's) optional ACL entries are deleted (HFS only), its access permission bits are zeroed, and its file miscellaneous mode bits might be altered, regardless of whether the file is local or remote. EXAMPLES
The following code fragment gets stat information on and copies its file miscellaneous bits and access control list to owned by the caller. If either file is remote, only the on is copied. DEPENDENCIES
and are only supported on HFS and JFS file systems on standard HP-UX operating systems. AUTHOR
and were developed by HP. SEE ALSO
acl(2), chown(2), getacl(2), getegid(2), geteuid(2), getuid(2), setacl(2), stat(2), acltostr(3C), chownacl(3C), strtoacl(3C), acl(5), aclv(5), thread_safety(5). cpacl(3C)
Man Page