Open System Services Shell and Utilities Reference Manual (G06.27+, H06.04+)
User Commands (c) chown(1)
NAME
chown - Changes the owner of files or directories
SYNOPSIS
chown [ -W NOG ][-W NOE ][-fR] owner[:group] file ...
FLAGS
-f Turns off error reporting.
-R Descends recursively through its directory arguments, setting the specified
owner (and group, if specified). When symbolic links are encountered, the the
ownership of the parent file or directory is changed, but the ownership of linked
files and directories is not changed. If chown fails to change the owner or group
of a particular file, or cannot 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
The chown command changes the owner of the specified files or directories to the specified user-
name or user ID.
A user with super ID priviledges can use the chown command to change the owner of a file.
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 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.
EXAMPLES
1. To recursively change the owner of the file 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-004 Hewlett-Packard Company 2−45