World map

 

BM: Baca dalam Bahasa Melayu

World L2: Keys & Staff

Read rwx permissions

You will learn: to read the nine keys in ls -l, for the owner, the group and everyone else.

Checked with Linux (Debian 13) on 1 Nov 2026

The problem

You wrote open.sh yourself. You type ./open.sh. The server says -bash: ./open.sh: Permission denied. It is your file! Why?

Pick one answer.

Watch

You are you in /home/you/shop. 4 things here. Services: cron running, ssh running, nginx running.

You are hereyou@kedai:~/shop$

Folder ~/shop

  • open.sh (file)-rw-r--r--
  • prices.txt (file)-rw-r--r--
  • secret.txt (file)-rw-------
  • staff/ (folder)drwxr-x---roster.txt

Services

  • cronrunningstarts at boot
  • sshrunningstarts at boot
  • nginxrunningstarts at boot

ls -l shows each file’s keys, its permissions. -rw-r--r-- is three key rings: the owner, the group, then everyone else.

Check

Each ring has three keys: r read, w write, x run. Which key does each job need?

Drag a card into a box. Or tap the card, then tap the box.

        Predict

        secret.txt shows -rw-------. Aina is not you and not in your group. Can she read it?

        Pick one answer.

        Try it

        Remember the locked password drawer? Read its keys: ls -l /etc/shadow.

        You are you in /home/you/shop. 4 things here. Services: cron running, ssh running, nginx running.

        You are hereyou@kedai:~/shop$

        Folder ~/shop

        • open.sh (file)-rw-r--r--
        • prices.txt (file)-rw-r--r--
        • secret.txt (file)-rw-------
        • staff/ (folder)drwxr-x---roster.txt

        Services

        • cronrunningstarts at boot
        • sshrunningstarts at boot
        • nginxrunningstarts at boot

        Check

        Tap every line where everyone else may read. Look at the last three letters.

        0 of 2 found

        Check

        The staff room shows drwxr-x---. The d means it is a folder. Can a stranger walk in?

        Pick one answer.

        You did it!

        You can now read who may read, write or run any file.

        Go deeper (optional)

        The first letter is the kind: - a file, d a folder, l a link. Then come the owner and the group names. root ignores most keys, so be extra careful as root.

        Real rep (optional): on Linux, compare ls -l /etc/passwd /etc/shadow, then ls -ld ~.