chown(1) — Commands
NAME
chown − Changes the owner of files or directories
SYNOPSIS
chown [−fhR] owner[:group] file ...
The chown command changes the owner of the specified files or directories to the specified username or user ID.
FLAGS
−fTurns off error reporting.
−hIf file is a symbolic link, chown −h file changes the owner of the symbolic link. chown file changes the owner of the file referenced by the symbolic link.
−RDescends recursively through its directory arguments, setting the specified owner.
DESCRIPTION
Only a user with superuser authority can use the chown command.
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.
EXAMPLES
To change the owner of the file program.c, enter:
chown steffan program.c
The user access permissions for program.c now apply to steffan. As the owner, steffan can use the chmod command to permit or deny the other users access to program.c. See the chmod command for details.
EXIT VALUES
0Successful completion
>0Error occurred
FILES
/etc/passwdContains usernames and numeric user IDs.