Difficulty: Easy
Correct Answer: chmod ugo+x letter
Explanation:
Introduction / Context:
Unix permissions control who can read, write, and execute files. The chmod command changes these modes for the user (u), group (g), and others (o). Granting execute permission is commonly required for scripts and binaries before they can be run.
Given Data / Assumptions:
Concept / Approach:
The symbolic chmod form uses u, g, o to denote permission classes and +x to add execute permission. Combining them as ugo+x applies the change to all three classes simultaneously for the specified file(s).
Step-by-Step Solution:
Verification / Alternative check:
Run ls -l letter before and after the chmod. You should see mode bits change, for example, from -rw-r--r-- to -rwxr-xr-x if no other changes occurred. This validates that execute permission is now available to all classes.
Why Other Options Are Wrong:
Common Pitfalls:
Forgetting that directories require execute (search) permission to enter; applying +x to data files that are not scripts/binaries is harmless but unnecessary. Also, ensure scripts have a proper shebang (for example, #!/bin/sh) when executed.
Final Answer:
chmod ugo+x letter
Discussion & Comments