Setting access modes

  • New files receive initial access mode as described by the umask.

  • The umask strips specified bits from the initial mode settings. Typical umasks are 002 and 022.

  • Existing file modes are changed using chmod with either symbolic or octal mode specifications:

    • Symbolic:

    • Octal bits:

      user r, w, x, group r, w, x, other r, w, x
      rwxrwxrwx = 111111111 = 777
      rwxr-xr-- = 111101100 = 751

chmod uses the following syntax:

chmod mode files

Modify the access mode on files using a symbolic or octal mode.

Get LPI Linux Certification in a Nutshell, 3rd Edition now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.