System Administration Guide

How to Change Permissions in Absolute Mode

  1. If you are not the owner of the file or directory, become superuser.

    Only the current owner or superuser can use the chmod command to change file permissions on a file or directory.

  2. Change permissions in absolute mode by using the chmod command.


    $ chmod nnn  filename
    

    nnn

    Specifies the octal values that change permissions on the file or directory. See Table 51-5 for the list of valid octal values.

    filename

    File or directory. 

  3. Verify the permissions of the file have changed.


    $ ls -l filename
    

Example--Changing Permissions in Absolute Mode

The following example sets rwxr-xr-x permissions on myfile.


$ chmod 755 myfile
$ ls -l myfile
-rwxr-xr-x   1 kryten   staff   6144 May 24 10:49 myfile