Skip to main content
Ganesh Joshi
Back to Cheatsheets

Linux file permissions

Updated 2026-02-15

chmod, chown, umask, and numeric modes. Read, write, execute for owner, group, and others.

Numeric modes

r=4, w=2, x=1. 7=rwx, 6=rw-, 5=r-x, 4=r--, 0=---. Owner (7) + Group (5) + Others (5) = 755. 644 = rw-r--r--.

chmod and chown

  • chmod 755 script.sh

    Owner rwx, others rx.

  • chmod +x file

    Add execute for all.

  • chmod -R 755 dir

    Recursive.

  • chown user:group file

    Change owner and group.

  • chown -R user:group dir

    Recursive chown.

umask

umask 022: new files 644, dirs 755. umask 002: files 664, dirs 775. Default = 666 - umask (files), 777 - umask (dirs).

Linux file permissions | Cheatsheet | Ganesh Joshi