chmod Interview Questions and Answers¶
Introduction¶
These questions test whether you understand what chmod does, when to use it, and how to verify the result on Linux.
Beginner Questions¶
What does chmod do?
It changes file and directory permission bits.
Show a basic command.
chmod 644 app.conf
Intermediate Questions¶
Name useful options.
-R: apply the mode recursively.-v: print each file that changes.--reference=FILE: copy permissions from another file.
Show a common administrator command.
chmod 755 script.sh
Scenario-Based Questions¶
How would you handle chmod 755?
chmod 755 script.sh
What would you verify afterward?
ls -l app.conf
Expected output should look similar to:
-rw-r--r-- 1 admin admin 742 May 30 10:00 app.conf
Practical Task Questions¶
Practice in a lab by running a safe version of the command, explaining the target, and showing the verification output.
Quick Review¶
chmod 644 app.conf
chmod 755 script.sh
ls -l app.conf
Related Guides¶
Summary¶
A strong chmod answer includes the purpose, a correct example, a common mistake, and a verification command with output you can interpret.