Manual pages › General commands (1)
chown-original(1)
change file owner
From the original Amiga UNIX 2.1 manual. Some things it mentions may not be in this release.
With the coreutil package (with the extra set), see chown(1) instead.
Also by this name: chown(2), System calls · chown(1B), BSD versions of commands
NAME
chown - change file owner
SYNOPSIS
chown [-R] [-h] owner file ...
DESCRIPTION
chown changes the owner of the files to owner. The owner may be either a decimal user ID or a login name found in /etc/passwd file.
If chown is invoked by other than the super-user, the set-user-ID bit of the file mode, 04000, is cleared.
Only the owner of a file (or the super-user) may change the owner of that file. Valid options to chown are:
-R Recursive. chown descends through the directory, and any subdirectories, setting the ownership ID as it proceeds. When symbolic links are encountered, they are traversed.
-h If the file is a symbolic link, change the owner of the symbolic link. Without this option, the owner of the file referenced by the symbolic link is changed. The operating system has a configuration option {_POSIX_CHOWN_RESTRICTED}, to restrict ownership changes. When this option is in effect the owner of the file is prevented from changing the owner ID of the file. Only the super-user can arbitrarily change owner IDs whether this option is in effect or not.
FILES
/etc/passwd
SEE ALSO
chgrp(1), chmod(1) chown(2) in the Programmer's Reference Manual passwd(4) in the System Administrator's Reference Manual.
NOTES
In a Remote File Sharing environment, you may not have the permissions that the output of the ls -l command leads you to believe. For more information see the ``Mapping Remote Users'' section of the Remote File Sharing chapter of the System Administrator's Guide.