Which command sets both the owner and the group of report.txt to alice and staff in a single invocation?

LPIC-1 Exam 101-500, objective 104. Devices, Linux filesystems, filesystem hierarchy standard easy

Machine-checked — no person has signed for it. This question was read against the source cited below by an automated pass, which found no contradiction. That is a weaker claim than it sounds: the same kind of process wrote the question, so it can confirm its own mistake.

Treat it as a good draft rather than as settled fact, and read the source below before you rely on it. It is not used in mock exams here — only questions a person has signed for are.

How these questions are written — where each question comes from, what the verification ledger records, and what happens when one is found wrong.

The options

Not correct chgrp alice:staff report.txt

Wrong. chgrp takes a group name only, so it would look for a group literally called 'alice:staff' and fail with 'invalid group'.

Correct chown alice:staff report.txt

Correct. chown accepts owner:group. Omitting the group (chown alice file) changes only the owner; writing chown :staff file changes only the group.

Not correct chmod alice:staff report.txt

Wrong. chmod changes permission bits, not ownership. It cannot parse a user:group argument as a mode.

Not correct newgrp staff report.txt

Wrong. newgrp takes a group name, not a file: it starts a new shell whose primary group is staff, which affects the group ownership of files you create afterwards. It changes nothing about an existing file.

Why

chown user:group changes both at once; chgrp is the group-only shortcut. Only root may give a file away to another user; an ordinary owner can change the group only to a group they belong to. -R applies the change recursively through a directory tree.

Where this comes from

Cited
LPI exam objective 104.5
What it says
Change file ownership and group ownership with chown and chgrp.

Practise this

Reading one question is not practice. The trainer will draw a short set from objective 104 and space the ones you get wrong.

Practise LPIC-1 Exam 101-500

More questions on this objective

All questions on Devices, Linux filesystems, filesystem hierarchy standard

Practise LPIC-1 Exam 101-500