The directory ~/reports is owned by the same user with permissions 755. The user reports they cannot edit report.txt but should be able to do so. Which command should the administrator run to grant the required write permission using the least-privilege approach?
chmod u+w report.txt adds write permission only for the file's owner, allowing the analyst to edit the file while leaving group and other permissions unchanged. chmod 664 report.txt would also add write access for the group, exceeding the minimum required. chown :analysts report.txt merely changes group ownership and does not grant write rights. chmod a+wx report.txt grants write and execute permissions to all users, which is far too permissive.
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 'chmod u+w' mean?
Open an interactive chat with Bash
Why is using 'chmod 777' not the best option?
Open an interactive chat with Bash
What is the difference between 'chown' and 'chmod'?