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

Draft — not checked yet. This question was written from the published exam objectives and cites the clause it comes from, but nobody has yet read it against that clause and signed for it.

It is kept out of search results and out of mock exams until they have. Read the source below before you take the answer as settled.

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 set from objective 104 and space the ones you get wrong.

Practise LPIC-1 Exam 101-500