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

User Commands (c) chown(1)
NAME
chown - Changes the owner of les or directories
SYNOPSIS
chown [ -W NOG ][-W NOE ][-fR] owner[:group] le ...
FLAGS
-f Turns off error reporting.
-R Descends recursively through its directory arguments, setting the specied
owner (and group, if specied). When symbolic links are encountered, the the
ownership of the parent le or directory is changed, but the ownership of linked
les and directories is not changed. If chown fails to change the owner or group
of a particular le, or cannot 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
The chown command changes the owner of the specied les or directories to the specied user-
name or user ID.
A user with super ID priviledges can use the chown command to change the owner of a le.
The owner argument must be a valid username or a valid numerical user ID. The optional group
argument must be a valid group name or a valid numerical group ID.
Environment Variables
The following environment variables affect the execution of the chown command:
UTILSGE Species 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 ag in the command.
EXAMPLES
1. To recursively change the owner of the le program.c,tosteffan enter:
chown steffan program.c
The user access permissions for program.c now apply to steffan. As the owner, steffan
can use the chmod command to permit or deny the other users access to program.c.
527188-003 Hewlett-Packard Company 245