Open System Services Shell and Utilities Reference Manual (G06.28+, H06.05+)
User Commands (c) chown(1)
NAME
chown - Changes the owner of files or directories
SYNOPSIS
chown [ -W NOG ][-W NOE ][-fhR] owner[:group] file ... |
FLAGS
-f Turns off error reporting.
-h Changes the ownership of a symbolic link, instead of the file to which the sym- |
bolic link points. When you use this flag, the chown command does not affect |
the file pointed to by the symbolic link. If you use the -R flag with this flag, |
recursion does not take place.
-R Causes chown to escend recursively through its directory arguments, setting the
specified owner (and group, if specified). If chown fails to change the owner or
group of a particular file, or cannot read or search a particular directory, it con-
tinues processing through the hierarchy. When symbolic links are encountered |
and the -h flag is not used, the mode of the parent file or directory changes, but |
the mode of linked files or directories does not change. If the -h flag is used with |
this flag, recursion does not take place.
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. Only a process running |
with an effective user ID equal to the super ID or with a user ID or group affiliation qualifying for |
membership in the Safeguard SECURITY-OSS-ADMINISTRATOR group can use the chown |
command to change the owner of a file. |
Only a process that has an effective user ID equal to the super ID or to the file owner, or that has |
an effective user ID or group affiliation qualifying for membership in the Safeguard |
SECURITY-OSS-ADMINISTRATOR group can use the chown command to change the group |
of a file. However, processes that have an effective user ID equal to the file owner can only |
change the group of a file 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 file mode (04000 and 02000, respectively) are |
cleared. |
527188-007 Hewlett-Packard Company 2−47