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

User Commands (c) chown(1)
NAME
chown - Changes the owner of les or directories
SYNOPSIS
chown [ -W NOG ][-W NOE ][-fhR] owner[:group] le ... |
FLAGS
-f Turns off error reporting.
-h Changes the ownership of a symbolic link, instead of the le to which the sym- |
bolic link points. When you use this ag, the chown command does not affect |
the le pointed to by the symbolic link. If you use the -R ag with this ag, |
recursion does not take place.
-R Causes chown to escend recursively through its directory arguments, setting the
specied owner (and group, if specied). If chown fails to change the owner or
group of a particular le, or cannot read or search a particular directory, it con-
tinues 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
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. Only a process running |
with an effective user ID equal to the super ID or with a user ID or group afliation qualifying for |
membership in the Safeguard SECURITY-OSS-ADMINISTRATOR group can use the chown |
command to change the owner of a le. |
Only a process that has an effective user ID equal to the super ID or to the le owner, or that has |
an effective user ID or group afliation qualifying for membership in the Safeguard |
SECURITY-OSS-ADMINISTRATOR group can use the chown command to change the group |
of a le. However, processes that have an effective user ID equal to the le owner can only |
change the group of a le to a group to which they belong (their effective group or one of their |
supplementary groups). |
If the chown command is invoked by a process whose effective user ID does not equal the super |
ID, the set-user-ID and set-group-ID bits of the le mode (04000 and 02000, respectively) are |
cleared. |
527188-007 Hewlett-Packard Company 247