Systems CourseC/C++ · Linux · Memory
LinuxLesson 30 of 441 min read5 questions

chmod

Change permission bits, numeric or symbolic.

Test yourself ↓

Concept core idea Watch out easy to get wrong

Concept

Key concepts

  1. Numeric mode sets all three triplets at once: chmod 755 f (rwx/r-x/r-x), chmod 644 f (rw-/r--/r--).
  2. Symbolic mode nudges bits: chmod +x f (x for all), chmod u+x f (owner only); u=owner, g=group, o=others, a=all.
  3. Missing x = 'Permission denied' when running ./script.sh or a fresh binary — the #1 cause.
Watch out

Easily confused

numeric vs symbolic chmod
Numeric (755) sets ALL bits at once. Symbolic (u+x) nudges specific bits without touching the rest.
chmod vs chown
chmod changes the permission BITS; chown changes the OWNER/group. Different things.

Test yourself

5 questions on this lesson. Write your answers from memory, then compare them with the model answers side by side.