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
    who

    Specifies whose permissions are to be changed.

    operator

    Specifies the operation to be performed.

    permissions

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

    filename

    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 1-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