Bird
0
0

After running chmod u+s file.sh, the setuid bit does not appear to be set. What is a common reason for this behavior?

medium📝 Debug Q6 of 15
Linux CLI - File Permissions and Ownership
After running chmod u+s file.sh, the setuid bit does not appear to be set. What is a common reason for this behavior?
AThe file is owned by root and cannot have setuid set
BThe filesystem does not support setuid bits on scripts
CThe file is a directory, not an executable
DThe user lacks write permission on the file
Step-by-Step Solution
Solution:
  1. Step 1: Understand setuid on scripts

    Many Linux systems and filesystems do not honor setuid bits on scripts for security reasons.
  2. Step 2: Analyze options

    The filesystem does not support setuid bits on scripts correctly identifies this limitation. Options B, C, and D do not explain why setuid bit would not be set or effective.
  3. Final Answer:

    The filesystem does not support setuid bits on scripts -> Option B
  4. Quick Check:

    Setuid on scripts often unsupported [OK]
Quick Trick: Setuid bit often ignored on scripts by filesystem [OK]
Common Mistakes:
  • Assuming setuid works on all file types
  • Confusing ownership restrictions with setuid behavior
  • Ignoring filesystem limitations

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Linux CLI Quizzes