Bird
0
0

A directory has permissions drwxrwsr-x. You want to add the sticky bit but accidentally run chmod +t directory and get an error. What is the likely cause?

medium📝 Debug Q7 of 15
Linux CLI - File Permissions and Ownership
A directory has permissions drwxrwsr-x. You want to add the sticky bit but accidentally run chmod +t directory and get an error. What is the likely cause?
AThe filesystem is mounted with 'noexec' option
BYou need root privileges to set the sticky bit
CYou lack write permission on the directory
DThe directory is a symbolic link
Step-by-Step Solution
Solution:
  1. Step 1: Understand sticky bit permission requirements

    Setting sticky bit usually requires root or owner privileges.
  2. Step 2: Analyze error cause

    If permission denied error occurs, lack of root privileges is a common cause.
  3. Final Answer:

    You need root privileges to set the sticky bit -> Option B
  4. Quick Check:

    Sticky bit needs root or owner rights [OK]
Quick Trick: Root or owner needed to set sticky bit [OK]
Common Mistakes:
MISTAKES
  • Assuming write permission is enough
  • Confusing noexec with sticky bit
  • Trying to set sticky bit on symlink

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Linux CLI Quizzes