HP-UX Reference (11i v1 00/12) - 1 User Commands N-Z (vol 2)

__________________________________________________________________________________________________________________________________________________________________________________________________
__________________________________________________________________________________________________________________________________________________________________________________________________
STANDARD Printed by: Nora Chuang [nchuang] STANDARD
/build/1111/BRICK/man1/neqn.1
________________________________________________________________
___ ___
s
setacl(1) setacl(1)
EXAMPLES
To add one ACL entry to file filea, giving user archer read permission only, type:
setacl -m user:archer:r-- filea
If an entry for user archer already exists, this command will set the permissions in that entry to r--.
To replace the entire ACL for file filea, adding entries for users archer and fletcher, allowing
read/write access, an entry for the file owner allowing all access, an entry for the file group allowing read
access only, and an entry for others disallowing all access, type:
setacl -s user::rwx,user:archer:rw-,user:fletcher:rw-,\
group::r--,other:--- filea
Note that following this command, the file permission bits would be set to -rwxrw----. Even though the
file owning group has only read permission, the maximum permissions available to all additional user
ACL entries, and all group ACL entries, are read and write, since the two additional user entries both
specify these permissions.
To set the same ACL on file filea as in the above example, using the -f option, type:
setacl -f filea.acl filea
with file filea.acl edited to contain:
user::rwx
user:archer:rw-
user:fletcher:rw-
group::r--
other:---
Because the -n option was not specified, no class entry was needed. If a class entry had been present
it would have been ignored.
FILES
/etc/passwd user IDs
/etc/group group IDs
SEE ALSO
acl(2), aclsort(3C), chmod(1), getacl(1), ls(1).
Section 1834 3 HP-UX Release 11i: December 2000
___
___