Open System Services Shell and Utilities Reference Manual (G06.25+, H06.03+)
Table Of Contents
chgrp(1) OSS Shell and Utilities Reference Manual
NAME
chgrp - Changes the group ownership of a file or directory
SYNOPSIS
chgrp [ -W NOG ][-W NOE ][-fR] group file ...
The chgrp command changes the group associated with the specified file or directory to
group.
FLAGS
-f Suppresses all error reporting.
-R Causes chgrp to descend recursively through its directory arguments, setting the
specified group ID. When symbolic links are encountered, the group of the parent file
or directory is changed, but the group of linked files or directories is not changed. If
chgrp fails to change the group ID of a particular file in the hierarchy, it continues to
process the remaining files. If chgrp cannot read or process a directory in the hierar-
chy, it continues to process the other parts of 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
The effective user of the process must match the owner of the file.
Users can change the group of a file to a group that they belong to (their effective group or one of
their supplementary groups). If you do not own the file and do not belong to the new group, you
must have superuser authority to change the group name or group ID.
The group argument must be either a valid group name or a valid group ID that exists in the
group database. If a numeric group operand exists in the group database as a group name, the
group ID number associated with that group name is used as the group ID.
Environment Variables
The following environment variables affect the execution of the chgrp command:
UTILSGE Specifies that HP extensions to the root directory should be omitted when the ini-
tial directory is root and a recursive operation occurs in an OSS shell command.
Application programs that test this variable might also honor its settings.
The UTILSGE value can be any of the following:
NOE Omit the /E directory.
NOG Omit the /G directory.
NOG:NOE Omit both the /G and /E directories.
The effect of assigning a value to the UTILSGE environment variable is the
same as specifying the -W NOG or -W NOE flag in the command.
2−38 Hewlett-Packard Company 527188-003