A world-writable directory has the sticky bit set.
bob is neither the directory owner nor the target-file owner and has no privilege.
What is true about bob deleting the file?
In a sticky directory, an ordinary user generally may delete or rename only files they own, or when they own the directory; a privileged process is another exception.
Detailed explanation
Incorrect. Directory write permission alone is restricted by the sticky bit.
Incorrect. Directory write permission alone is restricted by the sticky bit.
Incorrect. Read permission on the file does not grant deletion authority.
Incorrect. Read permission on the file does not grant deletion authority.
Correct. bob normally cannot delete the file under these conditions.
Correct. bob normally cannot delete the file under these conditions.
Incorrect. Being in the owning group does not by itself bypass sticky deletion rules.
Incorrect. Being in the owning group does not by itself bypass sticky deletion rules.
Try it yourself
An example you can run in a temporary verification environment.
man 7 inodeExpected result
sticky bitディレクトリのrestricted deletion規則Key points
- File owner
- Directory owner
- Privileged process
Notes
- Environment: Linux man-pages 6.x
- Command output formatting can vary slightly by distribution or tool version.
- Run the example in a temporary directory or process when possible.
Foundation review
Read the scope first
Check whether the command acts on the current shell, a new process, an existing process, or a file.
Verify the observable result
Use the supplied command and compare the output with the expected result.