Bird
0
0

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:
  1. 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.
  2. 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.
  3. Final Answer:

    Only the file owner or root can delete or rename files within that directory -> Option A
  4. 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

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Linux CLI Quizzes