Changing File Permissions
Concept & Overview
Imagine running a business where only managers can sign checks, employees can read schedules, and visitors can only look at the store sign. In Linux, we control who can read, write, or run files using a security system of numbers (called octal representation):
- 7 = Full access: Read + Write + Execute (rwx)
- 6 = Modify access: Read + Write (rw-)
- 5 = Read and run access: Read + Execute (r-x)
- 4 = Read-only access: Read (r--)
We apply these settings with chmod . E.g., chmod 755 script.sh lets you run the script, while others can only read and run it. We have a script named deploy.sh that's currently locked down—let's make it executable!
deploy.sh currently has restricted permissions (644). Run chmod 755 deploy.sh to make it executable by the owner and readable/executable by everyone else.Command Syntax Reference
| Command / Syntax | Description |
|---|---|
chmod 755 deploy.sh | Set executable permissions |
ls -l deploy.sh | Check current file permissions |
Verification Objectives
These conditions will be automatically verified when you run commands inside the interactive terminal simulator:
- ○Run the "chmod" command on deploy.sh
- ○Set permissions of deploy.sh to 755
Ready to complete Quest 31?
Test your skills live in the browser terminal with an emulated Linux filesystem, real-time command evaluation, and instant step-by-step hints.