OA. free
Free
Accenture Core Computer Science Core Computer Science Medium

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?

Choose one option.
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 file owner (user), + means add permission, and x means execute permission. This command adds execute permission to the owner only, without affecting group or other permissions. Option D is incorrect because chmod u+x does not remove permissions from other users—it only adds execute to the owner.

Step-by-step Derivation:
Breaking down chmod u+x foo:

  • u = user (owner) of the file
  • + = add permission (additive operation)
  • x = execute permission
  • foo = target file name

Result: Execute permission is granted to the owner only. Group and others permissions remain unchanged.

Why other options are wrong:

  • B: g (not u) would target the group
  • C: a (not u) would target all users
  • D: chmod u+x is additive; it does not remove permissions from others