GIAC Security Essentials Certification (GSEC) — Question 39
Which of the following Linux commands can change both the username and group name a file belongs to?
Answer options
- A. chown
- B. chgrp
- C. chmod
- D. newgrp
Correct answer: B
Explanation
The correct answer is B, as 'chgrp' specifically changes the group ownership of a file but does not alter the username. 'chown' would be the command used to change both the username and group name, while 'chmod' modifies file permissions and 'newgrp' changes the user's current group in the session.