Challenge - 5 Problems
Permission Mastery Badge
Get all challenges correct to earn this badge!
Test your skills under time pressure!
💻 Command Output
intermediate1:30remaining
What is the output of
ls -l permission part for a file with mode 754?Given a file with permission mode 754, what will the permission notation
rwxrwxrwx part look like in ls -l output?Attempts:
2 left
💡 Hint
Remember that 7 means rwx, 5 means r-x, and 4 means r-- for user, group, and others respectively.
✗ Incorrect
The permission 754 means: user=7 (rwx), group=5 (r-x), others=4 (r--). So the notation is '-rwxr-xr--'.
🧠 Conceptual
intermediate1:30remaining
What does the permission notation
-rw-r--r-- mean?Interpret the permission notation
-rw-r--r--. Which of the following is true?Attempts:
2 left
💡 Hint
Look at the letters for each user category: rw- means read and write, r-- means read only.
✗ Incorrect
The first character '-' means a regular file. Then owner has 'rw-' (read and write), group has 'r--' (read only), others have 'r--' (read only).
📝 Syntax
advanced1:30remaining
Which command sets permissions to
rwxr-x--- on a file named script.sh?Choose the correct chmod command to set permissions to
rwxr-x--- on script.sh.Attempts:
2 left
💡 Hint
Convert rwxr-x--- to numeric: rwx=7, r-x=5, ---=0.
✗ Incorrect
rwxr-x--- corresponds to 7 (rwx), 5 (r-x), 0 (no permissions). So chmod 750 sets this correctly.
🔧 Debug
advanced1:30remaining
Why does
chmod 777 file.txt pose a security risk?Select the main reason why setting permissions to
777 on a file is risky.Attempts:
2 left
💡 Hint
Think about what rwxrwxrwx means for all users.
✗ Incorrect
Permission 777 means everyone can read, write, and execute the file, which can cause security issues if unauthorized users modify or run it.
🚀 Application
expert2:00remaining
After running
chmod u=rwx,g=rx,o= file.txt, what is the permission notation?What is the exact permission notation shown by
ls -l for file.txt after running chmod u=rwx,g=rx,o= file.txt?Attempts:
2 left
💡 Hint
u=rwx means owner has rwx, g=rx means group has r-x, o= means others have no permissions.
✗ Incorrect
The command sets owner to rwx, group to r-x, and others to no permissions, resulting in '-rwxr-x---'.