A system administrator is managing a shared directory at /srv/data/reports. A new report file, quarterly.rpt, was created by the admin user, so it is owned by admin:admin. To allow all members of the analysts group to properly access this file, the administrator needs to change the group ownership of the file to analysts without altering the user ownership. Which command will accomplish this task specifically?
The correct command is chgrp analysts /srv/data/reports/quarterly.rpt. The chgrp command is specifically designed to change the group ownership of a file or directory. The chown analysts ... command would incorrectly change the user owner to analysts. The usermod -a -G analysts admin command would add the admin user to the analysts group, but it would not change the group ownership of the file itself. The setfacl -m g:analysts:r-- quarterly.rpt command modifies the Access Control List (ACL) to grant the group read permissions, but it does not change the fundamental group owner of the file.
Ask Bash
Bash is our AI bot, trained to help you pass your exam. AI Generated Content may display inaccurate information, always double-check anything important.
What does the `chgrp` command do?
Open an interactive chat with Bash
How is `chgrp` different from `chown`?
Open an interactive chat with Bash
When would you use ACLs like `setfacl` instead of `chgrp`?
Open an interactive chat with Bash
CompTIA Linux+ XK0-006 (V8)
Security
Your Score:
Report Issue
Bash, the Crucial Exams Chat Bot
AI Bot
Loading...
Loading...
Loading...
IT & Cybersecurity Package Join Premium for Full Access