Q15 /20 In UNIX-like OS, which is the correct meaning of the command chmod u+x foo?
Accenture technical mcq question, verified with a worked answer. Free to practise - no sign-up.
In UNIX-like OS, which is the correct meaning of the command chmod u+x foo?
Show answer & explanation
Answer: A. Give execute permission to owner of the file named foo
The chmod u+x foo command uses symbolic notation where u represents the user (owner), + means add permission, and x means execute. This adds execute permission only to the file owner without modifying permissions for group or others. Option D is incorrect because chmod u+x does not remove permissions from other users—it only adds to the owner's permissions.
Step-by-step Derivation:
Breaking down chmod u+x foo:
chmod: change mode commandu: user (owner) of the file+: add operatorx: execute permissionfoo: filename
Result: Execute permission is granted to the owner only. Group (g) and others (o) permissions remain unchanged. Option A correctly states this behavior.