System Administration Guide

How to Change Group Ownership

  1. List the file permissions.


    # ls -l filename
    
  2. Change the group that owns the file or directory.


    $ chgrp GID filename
    

    The group ID for the file or directory you specify is changed.

  3. Verify the file ownership change.


    # ls -l filename
    

Example--Changing Group Ownership


$ ls -l junk
-rw-r--r-- 1 kryten other 3138 Oct 31 14:49 junk
$ chgrp staff junk
$ ls -l junk
-rw-r--r-- 1 kryten staff 3138 Oct 31 14:49 junk

See Chapter 51, Securing Files (Tasks) for information about how to edit group accounts.