Open System Services Shell and Utilities Reference Manual (G06.25+, H06.03+)

chmod(1) OSS Shell and Utilities Reference Manual
NAME
chmod - Changes permissions and other le mode settings
SYNOPSIS
chmod [-fR] absolute_mode le ...
chmod [ -W NOG ][-W NOE ][-fR][who] +permission ... | -permission ... | =permis-
sion ... le ...
FLAGS
-f Does not report an error if the chmod command fails to change the mode on a le.
-R Causes the chmod command to recursively descend its directory arguments, setting the
mode for each le as described in Symbolic Mode and Absolute Mode in the
DESCRIPTION section. When symbolic links are encountered, the mode of the
parent le or directory is changed, but the mode of linked les or directories is not
changed. If chmod is unable to change the mode of a particular le, or unable to read
or search a particular directory, it continues processing through the hierarchy.
HP Extensions
-W NOG Species that the /G directory should be omitted when the initial directory is root
and the recursive ag (-R) is used. This ag is ignored when the initial directory
is not /, /E,or/E/system or when recursion does not occur.
-W NOE Species that the /E directory should be omitted when the initial directory is root
and the recursive ag (-R) is used. This ag is ignored when the initial directory
is not root or when recursion does not occur.
Specify both the -W NOG and -W NOE ags to omit both the /G and /E directories.
DESCRIPTION
You can use either symbolic mode or absolute mode to specify the desired permission settings.
Symbolic mode is more portable but does not offer all of the options of absolute mode.
You can change the permission code of a le or directory only if you own it or if you have
appropriate privileges.
Symbolic Mode
Symbolic mode has the form:
[who] operation permission[, operation permission ...]
The who argument species whether you are dening permissions for a user, group, or all others,
or any combination of these. The operation argument species whether the permission is being
added, removed, or assigned absolutely. The permission argument identies the operation that
the specied users can perform on le.
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 le creation mask,
umask (see the reference page for sh(1)), is applied.
240 Hewlett-Packard Company 527188-003