Challenge - 5 Problems
Permission Protector
Get all challenges correct to earn this badge!
Test your skills under time pressure!
💻 Command Output
intermediate2: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
Attempts:
2 left
💡 Hint
Look carefully at the permission string and the file type character at the start.
✗ Incorrect
The permission string
-rw-r----- means a regular file (-), read and write for owner (rw-), read for group (r--), and no permissions for others (---). The owner is alice and group is staff.🧠 Conceptual
intermediate1:30remaining
Why do permissions protect system security?
Which of the following best explains why file permissions are important for system security?
Attempts:
2 left
💡 Hint
Think about what permissions actually do to files.
✗ Incorrect
Permissions set who can read, write, or execute files, which helps prevent unauthorized users from accessing or modifying important system files.
🔧 Debug
advanced2: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.logAttempts:
2 left
💡 Hint
The script owner needs write permission, so add write permission to the user.
✗ Incorrect
Adding write permission to the user (owner) with
chmod u+w allows the script owner to write to the file. Other options modify group or others or remove write permission.🚀 Application
advanced2: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?Attempts:
2 left
💡 Hint
Only the owner should have read, write, and execute permissions.
✗ Incorrect
Permission 700 means only the owner can read, write, and enter the directory. Others have no access. 777 allows everyone access, 755 allows others to read and enter, 600 is invalid for directories because execute permission is needed to enter.
🧠 Conceptual
expert1:30remaining
Effect of removing execute permission on a script
What happens if you remove the execute permission from a shell script file?
Attempts:
2 left
💡 Hint
Think about what execute permission controls.
✗ Incorrect
Execute permission allows a file to be run as a program. Without it, you cannot run the script directly, but you can still open and edit the file.