220-1102 exam dumps

220-1102 practice question 241 of 828

A+ Core 2. Associate level, CompTIA. Free question with the correct answer and a full explanation.

220-1102 Question 241

Single answerchown

A Linux workstation in a small office hosts a shared folder at /srv/projects. A technician created a new file named budget.xlsx as the root user while troubleshooting. The file now shows ownership as root root, and members of the accounting group cannot update it even though the rest of the files in the folder are owned by user jlee and group accounting. The technician wants to change the file so jlee is the owner and accounting is the group, without altering any other files. Which command should the technician use?

  1. A

    chown jlee:accounting /srv/projects/budget.xlsx

  2. B

    chmod jlee:accounting /srv/projects/budget.xlsx

  3. C

    chgrp jlee accounting /srv/projects/budget.xlsx

  4. D

    chown -R jlee:accounting /srv/projects

Show answer and explanation

Correct answer: A

Explanation

The best answer is "chown jlee:accounting /srv/projects/budget.xlsx" because chown is the standard Linux command used to change file owner and, optionally, group ownership in a single command. In a support scenario, technicians should avoid unnecessarily broad changes, so using a command that targets only the affected file is the safest approach. chmod is used for permissions, not ownership, and chgrp changes only the group. Recursive ownership changes with chown -R are appropriate only when an entire directory tree must be updated. This aligns with standard Linux administration practices documented in the chown and chmod manual pages (for example, man chown and man chmod).

  • A. Correct.

    Correct. The chown command changes file ownership. Using the format chown user:group filename sets both the user owner and the group owner on the specified file only. In this scenario, it changes budget.xlsx to owner jlee and group accounting without affecting other files.

  • B. Incorrect.

    Incorrect. chmod changes permission bits such as read, write, and execute; it does not change the owning user or group. A common mistake is confusing ownership changes with permission changes because both affect access.

  • C. Incorrect.

    Incorrect. chgrp changes only the group ownership, and this option is also malformed for the stated goal. It would not set the user owner to jlee. Someone might choose this if they focus only on the accounting group requirement and overlook that the user owner must also be changed.

  • D. Incorrect.

    Incorrect. The -R option applies changes recursively to the entire /srv/projects directory tree. That would modify ownership on all files and subdirectories, which violates the requirement to change only budget.xlsx. This is a plausible but risky administrative error.

Timed practice exam

Take a 220-1102 practice test under exam conditions

90 questions in 90 minutes, drawn from this bank, with a score report and a per-question review when you finish.

Start timed exam