A technician with sudo access must hand the /srv/projects directory tree to user dana and group staff. Which three actions are correct? (Choose three.)
Choose 3 answers
Show the answer
Correct answersB. Add -R so the change applies to everything inside the directoryE. Run sudo chown dana:staff /srv/projects to set the owner and groupF. Use sudo, since only root can give a file to another user
AWhy not this: A blank user before the colon changes only the group, so dana would not become the owner as the task requires.
BWhy this is right: The -R option makes chown recurse through all files and subdirectories.
CWhy not this: chmod changes permission bits and does not accept owner:group names.
DWhy not this: 770 is a permission mode for chmod; chown would treat it as a user name and fail.
EWhy this is right: chown with user:group sets both the owning user and the owning group.
FWhy this is right: Regular users cannot transfer ownership to someone else, so elevated privileges are needed.
chown uses user:group syntax, accepts -R to recurse, and giving files to another user needs root. A group-only change with :staff leaves dana out as owner, and chmod and numeric modes set permissions, not ownership.