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

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 ][-fhR][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.
-h Changes the mode of a symbolic link, instead of the file to which the sym-
bolic link points. When you use this flag, the chmod command does not
affect the file pointed to by the symbolic link. If the symbolic link refers to a
directory and the both the -R and -h flags are used, the ownership of the sym-
bolic link is changed, but ownership of the directory to which the symbolic
link refers remains unchanged and recursion into that directory does not
occur.
-R Causes chmod to descend recursively through its directory arguments, set-
ting the mode for each file as described in Symbolic Mode and Absolute
Mode in the DESCRIPTION section. 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. When the chmod command
encounters a symbolic link:
If the symbolic link refers to a file, the owner of the file is changed.
If the symbolic link refers to a directory, the owner of the directory is
changed, but recursion into the directory does not occur.
If the symbolic link refers to a directory and the both the -R and -h
flags are used, the ownership of the symbolic link is changed, but
ownership of the directory to which the symbolic link refers remains
unchanged and recursion into that directory does not occur.
HP Extensions
-W NOG Specifies that the /G directory should be omitted when the initial direc-
tory 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 direc-
tory 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.
To change the file access permissions of a file or directory, the effective user ID of the process
must match the super ID or the owner of the file, or the effective user ID of the process or one of
its group afliations must qualify it for membership in the Safeguard SECURITY-OSS-
272 Hewlett-Packard Company 527188-021