Challenge - 5 Problems
chmod Master
Get all challenges correct to earn this badge!
Test your skills under time pressure!
💻 Command Output
intermediate2:00remaining
What is the output of
ls -l after running chmod 754 file.txt?You have a file named
file.txt. You run the command chmod 754 file.txt. What will be the permission string shown by ls -l file.txt?Linux CLI
chmod 754 file.txt
ls -l file.txtAttempts:
2 left
💡 Hint
Remember the digits in chmod represent owner, group, and others permissions in octal.
✗ Incorrect
The number 7 means read, write, execute (rwx) for owner. 5 means read and execute (r-x) for group. 4 means read only (r--) for others. So the permission string is '-rwxr-xr--'.
💻 Command Output
intermediate1:30remaining
What error occurs when running
chmod 999 file.txt?You try to set permissions with
chmod 999 file.txt. What happens?Linux CLI
chmod 999 file.txtAttempts:
2 left
💡 Hint
Check if the mode digits are valid octal numbers.
✗ Incorrect
Digits in chmod must be octal (0-7). '9' is invalid, so chmod reports 'invalid mode'.
📝 Syntax
advanced1:30remaining
Which command correctly adds execute permission for the group on
script.sh?You want to add execute permission for the group only, without changing other permissions. Which command is correct?
Attempts:
2 left
💡 Hint
The syntax is
chmod [who]+[permission] file.✗ Incorrect
The correct syntax to add execute permission for group is 'chmod g+x file'. Other options are invalid syntax.
🚀 Application
advanced2:00remaining
How to set permissions so owner has full access, group has read-only, and others have no access on
data.txt?You want
data.txt to have these permissions: owner can read, write, execute; group can only read; others have no permissions. Which command achieves this?Attempts:
2 left
💡 Hint
Convert permissions to octal: rwx=7, r--=4, ---=0.
✗ Incorrect
Owner rwx=7, group r--=4, others ---=0 gives 740.
🧠 Conceptual
expert2:30remaining
What is the effect of
chmod u=rwx,g=rx,o= file.txt?You run
chmod u=rwx,g=rx,o= file.txt. What permissions does file.txt have?Attempts:
2 left
💡 Hint
Look at each user class and the permissions assigned explicitly.
✗ Incorrect
The command sets owner (u) to rwx, group (g) to rx, and others (o) to no permissions.