chown
Changes the owner of a file
chown [options] owner:group file-list
chown [options] --reference=rfile file-list
The chown utility changes the owner of a file.
Arguments
The owner:group is the name or numeric user ID of the new owner of the file and/or the name or numeric group ID of the new group that the file is associated with, as specified following:
owner The new owner of file-list; the group is not changed
owner:group The new owner and new group association of file-list
owner: The new owner of file-list; the group association is changed to that of the new owner's login group
:group The new group associated with file-list; the owner is not changed
The file-list is a list of pathnames of the files whose ownership you want to change.
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access