Practice - 5 Tasks
Answer the questions below
1fill in blank
easyComplete 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'
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.
✗ Incorrect
The setuid bit is set using
u+s in the chmod command.2fill in blank
mediumComplete 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'
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.
✗ Incorrect
The setgid bit is set using
g+s on directories to make new files inherit the group.3fill in blank
hardFix 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'
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.
✗ Incorrect
The sticky bit is set using
o+t on directories to restrict file deletion.4fill in blank
hardFill 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'
Attempts:
3 left
💡 Hint
Common Mistakes
Using u+s sets setuid, not setgid.
Using +x only sets execute permission.
✗ Incorrect
Setgid is
g+s and sticky bit is o+t. Both can be combined in chmod.5fill in blank
hardFill 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'
Attempts:
3 left
💡 Hint
Common Mistakes
Using +x only sets execute permission.
Mixing up setuid and setgid bits.
✗ Incorrect
Setuid is
u+s, setgid is g+s, and sticky bit is o+t. All can be combined in chmod.