0
0
Linux CLIscripting~10 mins

Numeric permission mode (755, 644) in Linux CLI - Interactive Code Practice

Choose your learning style9 modes available
Practice - 5 Tasks
Answer the questions below
1fill in blank
easy

Complete 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'
A644
B777
C755
D700
Attempts:
3 left
💡 Hint
Common Mistakes
Using 644 instead of 755 will remove execute permissions.
Forgetting to specify the filename after the mode.
2fill in blank
medium

Complete 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'
A644
B755
C600
D700
Attempts:
3 left
💡 Hint
Common Mistakes
Using 755 instead of 644 will give execute permissions unnecessarily.
Not specifying the filename after the mode.
3fill in blank
hard

Fix 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'
A755
B700
C644
D777
Attempts:
3 left
💡 Hint
Common Mistakes
Using 644 which lacks execute permissions.
Using 700 which restricts permissions too much.
4fill in blank
hard

Fill 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'
A644
B755
C700
D600
Attempts:
3 left
💡 Hint
Common Mistakes
Swapping the numeric modes between the two files.
Using 700 or 600 which restrict permissions too much.
5fill in blank
hard

Fill 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'
A755
B644
C700
D600
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.