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.

chmod u+x foo modifies file permissions using symbolic notation: 'u' represents the user (owner), '+' means add, and 'x' is execute permission. This command adds execute permission only to the owner without affecting group or other permissions. Option D is incorrect because u+x does not remove permissions from others—it only adds execute to the owner.

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

  • u = user (owner/file owner)
  • + = add permission
  • x = execute permission
  • foo = target file

The command adds (+) execute permission (x) to the user/owner (u) only. It does not:

  • Affect group permissions (rules out B)
  • Affect all users (rules out C)
  • Remove permissions from others (rules out D)

Therefore, the answer is A.