1. Show permissions
ls -l prints the rwx permission triplets for user, group, and other.
ls -l script.shTyporithm · medium
Step 1 of 8 · intro card
System
ls -l shows the rwx triplet for user/group/other; chmod +x adds the execute bit; octal sets all bits at once — 644 is rw-r--r--, 755 is rwxr-xr-x; chown changes owner:group; and umask masks the default permissions of new files.
Every file carries read, write, and execute bits for three classes: the owning user, the group, and everyone else. ls -l prints them as a triplet like rwxr-xr-x, and you read it left to right as user, group, other.
chmod changes those bits. Symbolic form like +x adds the execute bit; octal form sets all of them at once, where each digit is a sum of read (4), write (2), and execute (1) — so 644 is rw-r--r-- and 755 is rwxr-xr-x.
chown changes ownership, taking an owner:group pair. umask sets the default permission mask for newly created files — 022 clears the group and other write bits, so new files start without world-writable access.
ls -l shows rwx for user, group, and other.
chmod +x adds execute; octal 644 is rw-r--r--, 755 is rwxr-xr-x.
chown sets owner:group; umask masks new-file defaults.
ls -l script.sh
chmod +x script.sh
chmod 644 file.txt
chown user:group file.txt
umask 022Connect each part of the code to the concept before you type.
ls -l prints the rwx permission triplets for user, group, and other.
ls -l script.shchmod +x adds the execute bit so the file can be run as a program.
chmod +x script.sh644 sets all bits at once: rw-r--r-- (owner read/write, others read-only).
chmod 644 file.txtchown sets the file's owner to user and its group to group.
chown user:group file.txtumask 022 masks the default permissions of new files, clearing group/other write.
umask 022Read the concept map and follow the code breakdown.
Type the implementation, repair mistakes and work through every recall exercise.
Use the final check without hints; revisit weak concepts in short practice sessions.