Module 1 · Linux: the 20 everyday commands · Lesson 5 of 16

Who may do what: chmod, chown

Read permissions like rwxr-xr-x, change them with chmod, and change owners with chown.

In this lesson · about 22 minutes

  • Read a permission string: owner, group, others and r, w, x
  • Use chmod with letters (+x) and with numbers (755, 644, 600)
  • Use sudo chown to give a file to another user

Key terms

Say the meaning to yourself, then tap a card to check.

Whiteboard · watch and try

Decoding rwxr-xr-x and 755

5 steps
Press Play and the tutor will talk you through it while writing on the board. Pause any time to write on the board yourself.

Tip: press Pause, then use the pen to work along on the board. Space plays and pauses; Ctrl+Z undoes your last mark.

Try it · watch it happen

Permission builder: who may do what

Tick the boxes and watch the letters and the number change together.

👀 Read (4)✏️ Write (2)▶️ Execute (1)Adds up to
Ownerlearner4 + 2 + 0 = 6
Grouplearner2 (in labgroup)4 + 2 + 0 = 6
Othersguest (everyone else)4 + 0 + 0 = 4
-rw-rw-r--=chmod 664

🧑 learner

✓ can open and read it

✓ can change it

✗ can run it as a program

👥 learner2 (in labgroup)

✓ can open and read it

✓ can change it

✗ can run it as a program

🌍 guest (everyone else)

✓ can open and read it

✗ can change it

✗ can run it as a program

Doors along the way: can learner2 reach /home/learner/lab/notes.txt?

To open a file you must pass through every folder before it. A folder's x permission is its door.

/home
→
/home/learner
→
lab/
→
notes.txt

Practice terminal · missions

Fix the backup script and the website files

Sam wrote a backup script but it will not run, and the web server user (www-data) needs to own the website's home page.

Missions 0 of 8

  1. 1Look at the permissions of the files in the scripts folder.
  2. 2Try to run the backup script: ./scripts/backup.sh
  3. 3Give the script permission to run.
  4. 4Run the backup script again.
  5. 5Make notes.txt private: only you may read and write it (use a number).
  6. 6Try to give projects/website/index.html to the user www-data, without sudo.
  7. 7Now do it as administrator, setting both owner and group to www-data.
  8. 8Check the result with a long listing of projects/website.
sam@practice-box:~

Type a command and press Enter. Try help to list commands. Tab finishes names, ↑ repeats.

  • ~ (/home/sam)you are here
  • documents
  • budget-2026.csv
  • letters
  • thank-you.txt
  • meeting-notes.txt
  • resume.pdf
  • downloads
  • installer.zip
  • report-final-v2.pdf
  • report-final.pdf
  • logs
  • access.log
  • app.log
  • old
  • app-2026-09.log
  • app-2026-10.log
  • notes.txt
  • photos
  • beach.jpg
  • cat.png
  • trip
  • day1.jpg
  • day2.jpg
  • projects
  • website
  • index.html
  • style.css
  • scripts
  • backup.sh
  • hello.shruns
  • todo.md

This picture updates as you type. Changed items flash. runs = executable, a name badge = owned by someone else.

Check your understanding0 of 4 correct

Question 1

1.What number matches rw-r--r--?

Question 2

2.A script says 'Permission denied' when you run ./deploy.sh. What is the usual fix?

Question 3

3.Why did chown fail without sudo?

Question 4

4.chmod 777 makes a permission error go away. Why is it a bad habit?

Quiz score: 0 of 4

Tip: answer every quiz question correctly first.

Written by Noviq Academy in its own words. The practice terminal is a simulation that runs in your browser: it imitates Linux (Ubuntu-style output) and Git closely, but it is not a real computer, and real output can differ slightly. The servers, people, web addresses and GitHub addresses in the labs are made up. Linux is a trademark of Linus Torvalds; Git and GitHub belong to their owners. Read-aloud uses your device's built-in voices.