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

Changing the group of a file

You can change the group of a file using the chgrp command if you are the owner of that file. If you need to change the group of a file that you do not own, you must ask the owner of the file to do this. You can also ask your system administrator, who can use the superuser (root) account to modify any file.

To change the group of a file, type chgrp, the name of the new group, the name of the file, and press <Enter>. For example, to change the group of the file report to a group called unixdoc, you could type:

   $ l report
   -rw-r-----   1 susannah techpubs      25 Jun 27 11:58 report
   $ chgrp unixdoc report
   $ l report
   -rw-r-----   1 susannah unixdoc       25 Jun 27 11:58 report

Next topic: Changing the owner of a file
Previous topic: Owner, group, other

© 2003 Caldera International, Inc. All rights reserved.
SCO OpenServer Release 5.0.7 -- 11 February 2003