What does rwx mean?

Linux permissions are assigned to three classes: owner, group and others. r means read, w write and x execute.

Numeric values

  • r = 4
  • w = 2
  • x = 1

For example, 755 gives the owner full access and grants read/execute to group and others.

chmod 755 script.sh
chmod 640 config.txt
chown user:group file.txt
ls -l

Note: understand the impact before changing system permissions. chmod -R 777 is not a safe fix.

Practice

Create a text file, set permissions to 640 and verify the result using ls -l.