LPIC-1 Exam 101 (Linux Administrator) — Question 7
Which chown command will change 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
Correct answer: D
Explanation
The correct answer is D because it uses the correct syntax of 'chown' with a colon to specify both the user and group. Option A incorrectly uses a slash instead of a colon, while options B and C use unsupported flags for specifying user and group together in this context.