Practice - 5 Tasks
Answer the questions below
1fill in blank
easyComplete the command to set permissions to 755 for the file named script.sh.
Linux CLI
chmod [1] script.sh Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Using 644 instead of 755 will remove execute permissions.
Forgetting to specify the filename after the mode.
✗ Incorrect
The numeric mode 755 sets read, write, and execute for owner, and read and execute for group and others.
2fill in blank
mediumComplete the command to set permissions to 644 for the file named document.txt.
Linux CLI
chmod [1] document.txt Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Using 755 instead of 644 will give execute permissions unnecessarily.
Not specifying the filename after the mode.
✗ Incorrect
The numeric mode 644 sets read and write for owner, and read-only for group and others.
3fill in blank
hardFix the error in the command to set permissions to 755 for the file named app.sh.
Linux CLI
chmod [1] app.sh Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Using 644 which lacks execute permissions.
Using 700 which restricts permissions too much.
✗ Incorrect
755 is the correct numeric mode to give execute permission to owner, group, and others as needed.
4fill in blank
hardFill both blanks to create a command that sets permissions to 644 for file.txt and 755 for script.sh.
Linux CLI
chmod [1] file.txt && chmod [2] script.sh
Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Swapping the numeric modes between the two files.
Using 700 or 600 which restrict permissions too much.
✗ Incorrect
644 is for file.txt to allow read/write for owner and read for others; 755 is for script.sh to allow execute permissions.
5fill in blank
hardFill all three blanks to create a script that sets permissions 755 on run.sh, 644 on data.txt, and 700 on secret.txt.
Linux CLI
chmod [1] run.sh chmod [2] data.txt chmod [3] secret.txt
Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Mixing up numeric modes for different files.
Using 600 instead of 700 for secret.txt which removes execute permission.
✗ Incorrect
755 for run.sh to allow execution, 644 for data.txt for read/write owner and read others, 700 for secret.txt to restrict access to owner only.