Open System Services Shell and Utilities Reference Manual (G06.28+, H06.05+)
chmod(1) OSS Shell and Utilities Reference Manual
To set the permission bits of access control list entries, use the setacl command instead of the |
chmod command. |
ACLs are not supported for symbolic links.
Symbolic Mode
Symbolic mode has the form:
[who] operation permission[, operation permission ...]
The who argument specifies whether you are defining permissions for a user, group, or all others,
or any combination of these. The operation argument specifies whether the permission is being
added, removed, or assigned absolutely. The permission argument identifies the operation that
the specified users can perform on file.
Valid options for the who argument are as follows:
a User, group, and all others (same effect as the combination ugo)
g Group
o All others
u User (owner)
If the who argument is omitted, the default value is a, but the setting of the file creation mask,
umask (see the reference page for sh(1)), is applied.
Valid options for the operation argument are as follows:
- Removes specified permissions.
+ Adds specified permissions.
= Clears the selected permission field and sets it to the specified code. If you do not
specify a permission code following =, the chmod command removes all permissions
from the selected field.
Valid options for the permission argument are as follows:
r Read permission.
w Write permission.
x Execute permission for files, search permission for directories.
X Execute permission only if file is a directory or if at least one execute bit (S_IXUSR,
S_IXGRP,orS_IXOTH) is set.
s Set-user-ID or set-group-ID permission.
This permission bit sets the effective user ID or group ID to that of the owner or group
owner of file whenever the file is run. Use this permission setting with the u or g option
to allow temporary or restricted access to files not normally accessible to other users.
An s appears in the user or group execute position of a long listing (see the reference
page for the ls command) to show that the file runs with set-user-ID or set-group-ID
permission.
Note that the command chmod o+s has no effect (the set-user-ID-on-execution and
set-group-ID-on-execution bits are not modified).
2−42 Hewlett-Packard Company 527188-007