nerdexam
LPI

101-400 · Question #445

Which chown command will change the ownership to dave and the group to staff on a file named data.txt?

The correct answer is D. chown dave:staff data.txt. See the full explanation below for the reasoning.

Question

Which chown command will change the ownership to dave and the group to staff on a file named data.txt?

Options

  • Achown dave/staff data.txt
  • Bchown -u dave -g staff data.txt
  • Cchown --user dave --group staff data.txt
  • Dchown dave:staff data.txt

How the community answered

(29 responses)
  • A
    17% (5)
  • B
    10% (3)
  • C
    3% (1)
  • D
    69% (20)

Community Discussion

6
Ingrid P.Ingrid P.Jun 22, 2026

D is correct. The chown syntax for setting both owner and group in one command is user:group followed by the filename, so chown dave:staff data.txt is exactly right. The colon separator is the standard POSIX form, and none of the other options reflect actual chown syntax, chown takes no -u or --user flags and the slash separator in option A is not valid on most systems.

14
Imani T.Imani T.Jun 24, 2026

The slash separator in option A is actually valid on some older systems and is still accepted by GNU coreutils for backwards compatibility, so it works on Linux even if the colon form is preferred.

0
Thiago A.Thiago A.Jun 4, 2026

D is your answer. chown takes owner and group as a single argument separated by a colon, so the syntax is chown owner:group file, and you can verify that in man 1 chown under the DESCRIPTION section. Option A uses a slash which is technically accepted by some implementations for historical reasons but the colon form is what the exam expects and what POSIX documents. Options B and C do not exist as valid flags, chown has no -u or --user flags because the first positional argument already handles the owner. Quick question for you though: do you know what happens when you run chown dave: data.txt with the colon but no group name after it? That behavior is worth knowing for the exam and it trips people up.

5
Samuel O.Samuel O.Jun 18, 2026

Saw this exact syntax trip up half my team when we migrated servers, D is the one that actually works.

4
Mei-Ling H.Mei-Ling H.Jun 13, 2026

D is right, chown uses colon syntax: dave:staff sets owner and group together.

3
Imani T.Imani T.Jun 26, 2026

D is right, and A would work on some older systems but the colon syntax is the standard.

1
Full 101-400 Practice