Difficulty: Easy
Correct Answer: chmod ugo+x report
Explanation:
Introduction / Context:
File permissions control who can read, write, or execute files on Unix/Linux systems. Making a script or program executable is a common administrative task. Using chmod with the correct symbolic mode ensures that only the intended permission bits are changed, preserving the rest of the file’s mode.
Given Data / Assumptions:
Concept / Approach:
chmod supports symbolic modes such as ugo+x to add execute permission to all three classes without disturbing other bits. This is safer than absolute numeric modes when you only want to add a specific capability. After applying, the executable bit is set for user, group, and others, enabling the file to be run as a program if its contents allow.
Step-by-Step Solution:
Verification / Alternative check:
Run ls -l before and after. If permissions were, for example, rw-r--r--, after the change they will become rwxr-xr-x. The only difference should be the addition of execute bits.
Why Other Options Are Wrong:
Common Pitfalls:
Confusing symbolic and numeric modes, unintentionally removing permissions by using an absolute numeric mode without considering current bits, or forgetting that scripts need a valid shebang line to run as expected even when marked executable.
Final Answer:
chmod ugo+x report
Discussion & Comments