Open System Services Shell and Utilities Reference Manual (G06.28+, H06.05+)

User Commands (c) chmod(1)
NAME
chmod - Changes permissions and other le mode settings
SYNOPSIS
chmod [-fR] absolute_mode le ...
chmod [ -W NOG ][-W NOE ][-fhR][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.
-h Changes the mode of a symbolic link, instead of the le to which the symbolic link |
points. When you use this ag, the chmod command does not affect the le pointed to |
by the symbolic link. If you use -R ag with this ag, recursion does not take place.
-R Causes chmod to descend recursively through its directory arguments, setting the
mode for each le as described in Symbolic Mode and Absolute Mode in the
DESCRIPTION section. 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. When symbolic links are encountered and the -h ag is not used, the mode |
of the parent le or directory changes, but the mode of linked les or directories does |
not change. If the -h ag is used with this ag, recursion does not take place.
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.
To change the le access permissions of a le or directory, the effective user ID of the process |
must match the super ID or the owner of the le, or the effective user ID of the process or one of |
its group afliations must qualify it for membership in the Safeguard SECURITY-OSS- |
ADMINISTRATOR group. |
If chmod is invoked by a process whose effective user ID does not equal the super ID or le |
owner, the set-user-ID and set-group-ID bits of the le mode (04000 and 02000, respectively) are |
cleared.
Access Control Lists (ACLs)
When you execute the chmod command, you can change the effective permissions granted by |
optional entries in the ACL for a le. In particular, using the chmod command to remove read, |
write, and execute permissions from a le owner, owning group, and all others works as |
expected, because the chmod command affects the class entry in the ACL, limiting any access |
that can be granted to additional users or groups through optional ACL entries. To verify the |
effect, use getacl command on the le after the chmod command completes and note that all |
optional (nondefault) ACL entries with nonzero permissions also have the comment |
# effective:---. |
527188-007 Hewlett-Packard Company 241