DOC HOME SITE MAP MAN PAGES GNU INFO SEARCH PRINT BOOK
 
Protecting files and directories

Changing the owner of a file

You can use the chown (change owner) command to change the ownership of a file that you own. As with chgrp, only the owner of a file or the superuser (root) can change the ownership of that file.

To use chown, type chown, the login name of new owner of the file, the name of the file you want to change, then press <Enter>.

For example, to change the owner of the file report from the previous example, you could type:

   $ l report
   -rw-r-----   1 susannah unixdoc       25 Jun 27 11:58 report
   $ chown root report
   $ l report
   -rw-r-----   1 root     unixdoc       25 Jun 27 11:58 report

Next topic: Changing the permissions on a file
Previous topic: Changing the group of a file

© 2005 The SCO Group, Inc. All rights reserved.
SCO OpenServer Release 6.0.0 -- 03 June 2005