O'Reilly logo

A Practical Guide to Red Hat® Linux® 8 by Mark G. Sobell

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required