0
0
Linux CLIscripting~10 mins

Special permissions (setuid, setgid, sticky bit) 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 the setuid bit on the file myapp.

Linux CLI
chmod [1] myapp
Drag options to blanks, or click blank then click option'
Ao+t
Bu+s
C+x
Dg+s
Attempts:
3 left
💡 Hint
Common Mistakes
Using g+s sets the setgid bit, not setuid.
Using +x only sets execute permission.
Using o+t sets the sticky bit, not setuid.
2fill in blank
medium

Complete the command to set the setgid bit on the directory shared.

Linux CLI
chmod [1] shared
Drag options to blanks, or click blank then click option'
Au+s
Bo+t
Cg+s
D+x
Attempts:
3 left
💡 Hint
Common Mistakes
Using u+s sets the setuid bit, not setgid.
Using o+t sets the sticky bit, not setgid.
Using +x only sets execute permission.
3fill in blank
hard

Fix the error in the command to set the sticky bit on the directory temp.

Linux CLI
chmod [1] temp
Drag options to blanks, or click blank then click option'
A+x
Bg+s
Cu+s
Do+t
Attempts:
3 left
💡 Hint
Common Mistakes
Using u+s or g+s sets setuid or setgid, not sticky bit.
Using +x only sets execute permission.
4fill in blank
hard

Fill both blanks to create a directory project with setgid and sticky bits set.

Linux CLI
mkdir project && chmod [1][2] project
Drag options to blanks, or click blank then click option'
Ag+s
Bo+t
Cu+s
D+x
Attempts:
3 left
💡 Hint
Common Mistakes
Using u+s sets setuid, not setgid.
Using +x only sets execute permission.
5fill in blank
hard

Fill all three blanks to create a file runme with setuid, setgid, and sticky bits set.

Linux CLI
touch runme && chmod [1][2][3] runme
Drag options to blanks, or click blank then click option'
Au+s
Bg+s
Co+t
D+x
Attempts:
3 left
💡 Hint
Common Mistakes
Using +x only sets execute permission.
Mixing up setuid and setgid bits.