Securing Files and Verifying File Integrity in Oracle® Solaris 11.2

Exit Print View

Updated: July 2014
 
 

How to Change Group Ownership of a File

Before You Begin

If you are not the owner of the file or directory, you must be assigned the Object Access Management rights profile. To change a file that is a public object, you must assume the root role.

For more information, see Using Your Assigned Administrative Rights in Securing Users and Processes in Oracle Solaris 11.2 .

  1. Change the group ownership of a file.
    % chgrp scifi example-file

    For information about setting up groups, see Chapter 1, About User Accounts and User Environments, in Managing User Accounts and User Environments in Oracle Solaris 11.2 .

  2. Verify that the group ownership of the file has changed.
    % ls -l example-file
    -rw-r--r--   1 stacey   scifi   112640 June 20 08:55  example-file

    Also see Example 1–2.