Go to main content

Securing Files and Verifying File Integrity in Oracle® Solaris 11.4

Exit Print View

Updated: November 2020

How to Change File Permissions in Symbolic Mode

In this procedure, a user changes permissions on a file that the user owns.

  1. Change permissions in symbolic mode.
    % chmod who operator permissions filename

    Specifies whose permissions are to be changed.


    Specifies the operation to be performed.


    Specifies what permissions are to be changed. For the list of valid symbols, see Figure 5, Table 5, Setting File Permissions in Symbolic Mode.


    Specifies the file or directory.

  2. Verify that the permissions of the file have changed.
    % ls -l filename

    Note -  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.
Example 3  Changing Permissions in Symbolic Mode

In this example, the owner removes read permission others.

% chmod o-r example-file1

The following example, the owner adds read and execute permissions for user, group, and others.

% chmod a+rx example-file2

In this example, the owner adds read, write, and execute permissions for group members.

% chmod g=rwx example-file3