What happens when the sticky bit is set on a directory in Linux?
easy📝 Conceptual Q1 of 15
Linux CLI - File Permissions and Ownership
What happens when the sticky bit is set on a directory in Linux?
AOnly the file owner or root can delete or rename files within that directory
BAll users can delete any file inside the directory regardless of ownership
CFiles inside the directory inherit the directory owner's permissions
DThe directory becomes executable by all users
Step-by-Step Solution
Solution:
Step 1: Understand sticky bit behavior
The sticky bit on a directory restricts file deletion or renaming to the file's owner, the directory owner, or root.
Step 2: Analyze options
Only the file owner or root can delete or rename files within that directory correctly describes this behavior. Options B, C, and D are incorrect as they misrepresent sticky bit effects.
Final Answer:
Only the file owner or root can delete or rename files within that directory -> Option A
Quick Check:
Sticky bit limits file deletion to owners [OK]
Quick Trick:Sticky bit restricts file deletion to owners only [OK]
Common Mistakes:
MISTAKES
Confusing sticky bit with setuid or setgid effects
Assuming sticky bit makes directory executable
Believing sticky bit changes file permissions inside directory
Master "File Permissions and Ownership" in Linux CLI
9 interactive learning modes - each teaches the same concept differently