file owner and/or group.
chown [-fhv] [-R [-H | -L | -P]] owner[:group] file ...
chown [-fhv] [-R [-H | -L | -P]] :group file ...
-R Recurse: Change the mode of file hierarchies rooted in the files
instead of just the files themselves.
-R -H Follow symbolic links on the command line
(by default Symbolic links within the tree are not followed.)
-R -L All symbolic links are followed.
-R -P No symbolic links are followed. (default)
-f Do not display a diagnostic message if chmod could not modify the
mode for file.
-h If the file is a symbolic link, change the mode of the link
itself rather than the file that the link points to.
-v Verbose, show filenames as the mode is modified*
owner and group operands are both optional; however, at least one must be
specified. If the group operand is specified, it must be preceded by a colon (:)
The -v option is non-standard and its use in scripts is not recommended.
ownership of a file may only be altered by a super-user for obvious security
versions of the chown utility used the dot (.)
character to distinguish the group name. This has been changed to be a colon (:)
character so that user and group names may contain the dot character.
-v option is non-standard and its use in scripts is not recommended.
owner/group may be either a numeric ID or a name. If a user/group name is also a
numeric user ID, the operand is used as a user name.
exits 0 on success, and >0 if an error occurs.
Assign Ursula as the owner of "MyFile.txt" file in the Shared
sudo chown Ursula /Users/Shared/MyFile.txt
Ursula as the owner, and staff as the group for everything in the "tmp"
sudo chown -R Ursula:staff /Users/Shared/tmp/