Open System Services Shell and Utilities Reference Manual (G06.27+, H06.04+)

User Commands (c) chmod(1)
Valid options for the operation argument are as follows:
- Removes specied permissions.
+ Adds specied permissions.
= Clears the selected permission eld and sets it to the specied code. If you do not
specify a permission code following =, the chmod command removes all permissions
from the selected eld.
Valid options for the permission argument are as follows:
r Read permission.
w Write permission.
x Execute permission for les, search permission for directories.
X Execute permission only if le 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 le whenever the le is run. Use this permission setting with the u or g option
to allow temporary or restricted access to les 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 le 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 modied).
t Save text permission.
In some versions of the UNIX system, setting this permission bit causes the text seg-
ment of a program to remain in virtual memory after its rst use. Such systems there-
fore do not transfer the program code of frequently accessed programs into the paging
area.
You can specify this permission for OSS les, but it has no effect. The letter t appears
in the execute position of the all others option to indicate that the le has this bit (the
sticky bit) set.
If a directory has this bit set, then deletion in it is restricted. An entry in a sticky direc-
tory can be removed or renamed by a user only if the user has write permission for the
directory and the user is the owner of the le, the owner of the directory, or has
appropriate permissions.
The u, g, and o options indicate that permission is to be taken from the current mode. Omitting
permission is useful only with = to remove all permissions. For example, entering the following
command clears all permission elds for the user and resets them all to those of the group for
le1:
u=g le1
All permission bits not explicitly specied are cleared.
You can specify multiple symbolic modes, separated with commas. Do not separate items in this
list with spaces. Operations are performed in the order they appear from left to right.
527188-004 Hewlett-Packard Company 241