0
0
Linux CLIscripting~20 mins

Why permissions protect system security in Linux CLI - Challenge Your Understanding

Choose your learning style9 modes available
Challenge - 5 Problems
🎖️
Permission Protector
Get all challenges correct to earn this badge!
Test your skills under time pressure!
💻 Command Output
intermediate
2:00remaining
Understanding file permissions with ls -l
What is the output of the command ls -l on a file with permissions -rw-r----- owned by user alice and group staff?
Linux CLI
ls -l example.txt
Adrw-r----- 1 alice staff 1234 Apr 27 12:00 example.txt
B-rw-r--r-- 1 alice staff 1234 Apr 27 12:00 example.txt
C-rwxr-xr-x 1 alice staff 1234 Apr 27 12:00 example.txt
D-rw-r----- 1 alice staff 1234 Apr 27 12:00 example.txt
Attempts:
2 left
💡 Hint
Look carefully at the permission string and the file type character at the start.
🧠 Conceptual
intermediate
1:30remaining
Why do permissions protect system security?
Which of the following best explains why file permissions are important for system security?
AThey make files load faster by limiting access.
BThey control who can read, write, or execute files, preventing unauthorized access or changes.
CThey encrypt files so only certain users can open them.
DThey automatically back up files to protect data.
Attempts:
2 left
💡 Hint
Think about what permissions actually do to files.
🔧 Debug
advanced
2:00remaining
Identifying permission error in script
A script tries to write to a file but fails with a 'Permission denied' error. Which command will correctly fix the permission so the script owner can write the file?
Linux CLI
echo 'Hello' > /var/log/app.log
Achmod u+w /var/log/app.log
Bchmod o+w /var/log/app.log
Cchmod g+w /var/log/app.log
Dchmod a-w /var/log/app.log
Attempts:
2 left
💡 Hint
The script owner needs write permission, so add write permission to the user.
🚀 Application
advanced
2:00remaining
Setting secure permissions for a private directory
You want to create a directory secret that only you can access. Which command sets the correct permissions?
Amkdir secret && chmod 755 secret
Bmkdir secret && chmod 777 secret
Cmkdir secret && chmod 700 secret
Dmkdir secret && chmod 600 secret
Attempts:
2 left
💡 Hint
Only the owner should have read, write, and execute permissions.
🧠 Conceptual
expert
1:30remaining
Effect of removing execute permission on a script
What happens if you remove the execute permission from a shell script file?
AYou cannot run the script directly, but you can still read and edit it.
BThe script will run faster because it is not executable.
CThe script will delete itself automatically.
DThe script will run but with limited features.
Attempts:
2 left
💡 Hint
Think about what execute permission controls.