0
0
Linux CLIscripting~20 mins

Permission notation (rwxrwxrwx) in Linux CLI - Practice Problems & Coding Challenges

Choose your learning style9 modes available
Challenge - 5 Problems
🎖️
Permission Mastery Badge
Get all challenges correct to earn this badge!
Test your skills under time pressure!
💻 Command Output
intermediate
1: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?
A-rwxr-xr--
B-rwxr-xr-x
C-rwxr--r--
D-rwxrwxr--
Attempts:
2 left
💡 Hint
Remember that 7 means rwx, 5 means r-x, and 4 means r-- for user, group, and others respectively.
🧠 Conceptual
intermediate
1:30remaining
What does the permission notation -rw-r--r-- mean?
Interpret the permission notation -rw-r--r--. Which of the following is true?
AOwner can read and write; group and others can only read
BOwner can read, write and execute; group and others can read and execute
COwner can read only; group and others have no permissions
DOwner, group, and others all have read and write permissions
Attempts:
2 left
💡 Hint
Look at the letters for each user category: rw- means read and write, r-- means read only.
📝 Syntax
advanced
1: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.
Achmod 755 script.sh
Bchmod 700 script.sh
Cchmod 750 script.sh
Dchmod 754 script.sh
Attempts:
2 left
💡 Hint
Convert rwxr-x--- to numeric: rwx=7, r-x=5, ---=0.
🔧 Debug
advanced
1: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.
AIt disables all permissions for group and others.
BIt allows anyone to read, write, and execute the file, which can lead to unauthorized changes or execution.
CIt restricts the owner from modifying the file.
DIt only allows the owner to execute the file.
Attempts:
2 left
💡 Hint
Think about what rwxrwxrwx means for all users.
🚀 Application
expert
2: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?
A-rwxr--r--
B-rwxrwxrwx
C-rwxr-----
D-rwxr-x---
Attempts:
2 left
💡 Hint
u=rwx means owner has rwx, g=rx means group has r-x, o= means others have no permissions.