MPE/iX Shell and Utilities Reference Manual, Vol 1

chown(1) MPE/iX Shell and Utilities chown(1)
NAME
chown — change the ownership of files and/or directories
SYNOPSIS
chown [–fR] owner [:group] pathname ...
DESCRIPTION
chown sets the user ID
to owner for the files and directories named by pathname arguments.
owner can be a user name from the user database the user database, or a numeric user ID.
If you include a group name (specify the owner followed immediately by a colon (:) and
group with no intervening spaces, such as owner:group) then chown also sets the group ID to
group for the files and directories named.
Options
chown accepts the following options:
–f does not issue an error message if chown cannot change the owner. In this case,
chown always returns a status of zero.
–R If a pathname on the command line is the name of a directory, chown changes all the
files and subdirectories under that directory to belong to the specified owner (and
group,if:group is specified). If chown cannot change some file or subdirectory
under the directory, it continues to try to change the other files and subdirectories
under the directory, but exits with a non-zero status.
DIAGNOSTICS
Possible exit status values are:
0 You specified –f,orchown successfully changed the ownership of all the specified files
and directories.
1 Failure due to any of the following:
— unable to access a specified file
— unable to change the owner of a specified file
— unable to read the directory containing the directory entry of the file
— encountered a fatal error when using the –R option
2 Failure due to any of the following:
— the command line contained an invalid option
— the command line had too few arguments
— specified an owner with a userid that the system did not recognize
1-92 Commands and Utilities