setacl.1 (2010 09)
s
setacl(1) setacl(1)
NAME
setacl - modify access control lists (ACLs) for files (JFS File Systems only)
SYNOPSIS
setacl [-n] -s acl_entries file...
setacl [-n] -m|-d
acl_entries [-m|-d acl_entries ]... file...
setacl [-n] -f acl_file file...
DESCRIPTION
For each file specified,
setacl will either replace its entire ACL, including the default ACL on a direc-
tory, or it will add, modify, or delete one or more ACL entries, including default entries on directories.
The
-s option will set the ACL to the entries specified on the command line. The
-f option will set the
ACL to the entries contained within the file acl_file . The
-d option will delete one or more specified
entries from the file’s ACL. The
-m option will add or modify one or more specified ACL entries.
One of the options
-s, -m,
-d,or-f must be specified. If -s or -f are specified, other options are
invalid. The
-m and -d options may be combined, and multiple
-m and -d options may be specified.
For the
-m and -s options, acl_entries are one or more comma separated ACL entries selected from the
following list. For the
-f option, acl_file must contain ACL entries, one to a line, selected from the same
list. Default entries may only be specified for directories.
Bold face’ indicates that characters must
be typed as specified, brackets denote optional characters, and italicized characters are to be specified by
the user. Choices, of which exactly one must be selected, are separated by vertical bars.
u[ser]::operm |perm
u[ser]:uid :operm|perm
g[roup]::operm |perm
g[roup]:gid :operm|perm
c[lass]:operm |perm
o[ther]:operm |perm
d[efault]:u[ser]::operm |perm
d[efault]:u[ser]:uid:operm|perm
d[efault]:g[roup]::operm |perm
d[efault]:g[roup]:gid:operm |perm
d[efault]:c[lass]::operm |perm
d[efault]:o[ther]::operm |perm
For the
-d option, acl_entries are one or more comma separated ACL entries without permissions,
selected from the following list. Note that the entries for file owner, owning group, and others may not be
deleted.
u[ser]:uid
g[roup]:gid
d[efault]:u[ser]:
d[efault]:u[ser]:uid
d[efault]:g[roup]:
d[efault]:g[roup]:gid
d[efault]:c[lass]:
d[efault]:o[ther]:
In the above lists, the user specifies the following:
perm is a permissions string composed of the characters
r (read), w (write), and x (execute), each of
which may appear at most one time, in any order. The character - may be specified as a place-
holder.
operm is the octal representation of the above permissions, with 7 representing all permissions, or
rwx,
and 0 representing no permissions, or ---.
uid is a login name or user ID.
gid is a group name or group ID.
The options have the following meanings:
-n Normally, setacl recalculates the group class entry so as to ensure that permissions granted in
the additional ACL entries will actually be granted, and the value specified in the class entry
is ignored. If the -n option is specified, the recalculation is not performed, and the value
HP-UX 11i Version 3: September 2010 − 1 − Hewlett-Packard Company 1