chown - Changes the owner of files or directories
chown [-fhR] owner[:group] file...
command changes the owner of the specified
files or directories to the specified user name or user ID.
Interfaces documented on this reference page conform to industry standards as follows:
chown: XPG4, XPG4-UNIX
Refer to the
reference page for more information
about industry standards and associated tags.
[Compaq] Turns off error reporting.
is a symbolic
changes the owner of the symbolic link. The
format changes the owner of the file referenced by the
Descends recursively through its directory arguments, setting
the specified owner.
The pathname of the file for which ownership is to be changed. A user ID and optional group ID to be assigned to file. The owner portion of this operand must be a user name from the user database or a numeric user ID. Either specifies a user ID to be given to each file named by one of the file operands. If a numeric owner operand exists in the user database as a user name, the user ID number associated with that user name will be used as the user ID.
[Compaq] Only a user with superuser authority can use the chown command.
argument must be a valid user name or a valid numerical user ID. The optional
argument must be a valid group name or a valid numerical
The following exit values are returned:
command executed successfully
and all requested changes have been made.
An error occurred.
To change the owner of the file program.c, enter: chown steffan program.c
The user access permissions for
steffan. As the owner,
command to permit or deny the other users
program.c. See the
command for details.
The following environment variables affect the execution of
Provides a default value for the internationalization variables
that are unset or null. If
is unset or null, the corresponding value from the default locale is used.
If any of the internationalization variables contain an invalid setting, the
utility behaves as if none of the variables had been defined.
If set to a non-empty string value, overrides the values of
all the other internationalization variables.
Determines the locale for the interpretation of sequences
of bytes of text data as characters (for example, single-byte as opposed to
multibyte characters in arguments).
Determines the locale for the format and contents of diagnostic
messages written to standard error.
Determines the location of message catalogues for the processing
Contains user names and numeric user IDs.
Commands: chgrp(1), chmod(1), passwd(1)
Functions: chown(2), chmod(2)