LPIC-1 Exam 101 v5 (Linux Administrator) — Question 112
Which chown command changes the ownership to dave and the group to staff on a file named data.txt?
Answer options
- A. chown dave/staff data.txt
- B. chown -u dave -g staff data.txt
- C. chown --user dave --group staff data.txt
- D. chown dave+staff data.txt
- E. chown dave:staff data.txt
Correct answer: E
Explanation
The correct answer is E, as the syntax 'dave:staff' properly specifies the user and group in the chown command. Option A uses incorrect syntax with a slash, while B and C do not follow the typical shorthand format for setting user and group together. Option D incorrectly uses a plus sign, which is not valid for changing ownership.