Open System Services Shell and Utilities Reference Manual (G06.27+, H06.04+)
chmod(1) OSS Shell and Utilities Reference Manual
NAME
chmod - Changes permissions and other file mode settings
SYNOPSIS
chmod [-fR] absolute_mode file ...
chmod [ -W NOG ][-W NOE ][-fR][who] +permission ... | -permission ... | =permis-
sion ... file ...
FLAGS
-f Does not report an error if the chmod command fails to change the mode on a file.
-R Causes the chmod command to recursively descend its directory arguments, setting the
mode for each file as described in Symbolic Mode and Absolute Mode in the
DESCRIPTION section. When symbolic links are encountered, the mode of the
parent file or directory is changed, but the mode of linked files or directories is not
changed. If chmod is unable to change the mode of a particular file, or unable to read
or search a particular directory, it continues processing through the hierarchy.
HP Extensions
-W NOG Specifies that the /G directory should be omitted when the initial directory is root
and the recursive flag (-R) is used. This flag is ignored when the initial directory
is not /, /E,or/E/system or when recursion does not occur.
-W NOE Specifies that the /E directory should be omitted when the initial directory is root
and the recursive flag (-R) is used. This flag is ignored when the initial directory
is not root or when recursion does not occur.
Specify both the -W NOG and -W NOE flags 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 file 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 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.
2−40 Hewlett-Packard Company 527188-004