0
0
Linux CLIscripting~10 mins

chmod (change permissions) 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 give execute permission to the user on file.txt.

Linux CLI
chmod u[1] file.txt
Drag options to blanks, or click blank then click option'
A+x
B-r
C+w
D-x
Attempts:
3 left
💡 Hint
Common Mistakes
Using '-x' removes execute permission instead of adding it.
Using '+w' adds write permission, not execute.
2fill in blank
medium

Complete the command to remove write permission from group on script.sh.

Linux CLI
chmod g[1] script.sh
Drag options to blanks, or click blank then click option'
A+x
B-w
C+w
D-r
Attempts:
3 left
💡 Hint
Common Mistakes
Using '+w' adds write permission instead of removing it.
Using '-r' removes read permission, not write.
3fill in blank
hard

Fix the error in the command to add read permission for others on data.csv.

Linux CLI
chmod o[1] data.csv
Drag options to blanks, or click blank then click option'
A+r
Brw
Cr+
D-r
Attempts:
3 left
💡 Hint
Common Mistakes
Writing 'r+' instead of '+r' causes syntax error.
Using '-r' removes read permission instead of adding it.
4fill in blank
hard

Fill both blanks to set read and write permissions for user and remove execute permission for group on file.txt.

Linux CLI
chmod u[1],g[2] file.txt
Drag options to blanks, or click blank then click option'
A+rw
B-x
C+x
D-rw
Attempts:
3 left
💡 Hint
Common Mistakes
Using '+x' instead of '-x' removes execute permission incorrectly.
Using '-rw' for user removes permissions instead of adding.
5fill in blank
hard

Fill all three blanks to add execute permission for user, remove write permission for group, and add read permission for others on app.sh.

Linux CLI
chmod u[1],g[2],o[3] app.sh
Drag options to blanks, or click blank then click option'
A+x
B-w
C+r
D-x
Attempts:
3 left
💡 Hint
Common Mistakes
Mixing '+' and '-' signs incorrectly.
Using '-x' instead of '+x' for user permission.