Bird
0
0

After running chmod 755 script.sh, users still cannot execute the script. What is the most probable cause?

medium📝 Debug Q6 of 15
Linux CLI - File Permissions and Ownership
After running chmod 755 script.sh, users still cannot execute the script. What is the most probable cause?
AThe script is owned by root and cannot be executed by others
BThe script lacks read permission for the owner
CThe filesystem is mounted with the 'noexec' option
DThe script file is empty
Step-by-Step Solution
Solution:
  1. Step 1: Check permissions

    chmod 755 grants execute permission to all users.
  2. Step 2: Consider filesystem mount options

    If the filesystem is mounted with 'noexec', execution is blocked regardless of permissions.
  3. Step 3: Evaluate other options

    Read permission is present; ownership by root doesn't block execution if permissions allow; file emptiness doesn't prevent execution.
  4. Final Answer:

    The filesystem is mounted with the 'noexec' option -> Option C
  5. Quick Check:

    Mount options can override permissions [OK]
Quick Trick: Mount options like 'noexec' block execution despite permissions [OK]
Common Mistakes:
  • Assuming permissions alone control execution
  • Ignoring filesystem mount options
  • Confusing ownership with execution rights

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Linux CLI Quizzes