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 permissions using the symbolic mode syntax. The u stands for 'user' (file owner), + means add the permission, and x means execute permission. This command adds execute permission only to the owner without affecting group or others. Option D is incorrect because the + operator adds permissions without removing permissions from others—only chmod u=x foo (with =) would overwrite and remove other permissions.

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

  • u = user (owner of the file)
  • + = add this permission (does not remove existing permissions)
  • x = execute permission
  • foo = target file

Result: Execute permission is added to the owner's existing permissions only. Group and others remain unchanged.