Lazo Lab Sign up

Linux & the Command Line / Users and permissions

Lesson 12 of 30

chmod

chmod changes permissions. Numbers add up: read 4, write 2, execute 1. So 755 is rwx for the owner and r-x for everyone else.

Key points

  • chmod +x script.sh makes it runnable
  • 600 = only owner can read/write
  • Never chmod 777 to 'fix' things
chmod 600 secret.key
chmod +x deploy.sh
Watch a video on thisOpens YouTube search results for “chmod” in a new tab

Quiz · +10 XP

What permissions does chmod 600 give?

Log in to save progress and earn XP.