Courseiva
mediumMultiple ChoiceObjective-mapped

220-1102 Practice Question: That a shared file on a Linux server is not…

A user reports that a shared file on a Linux server is not accessible to their team. The file permissions are -rwxr----- and the user is a member of the group 'staff'. The file's group owner is 'admin'. Which command should the administrator run to allow the staff group to read the file?

⚠ Common exam trap

Watch out — candidates often confuse 'chmod g+r' (which modifies permissions for the current group) with changing the group ownership, leading them to overlook the core issue that the file's group owner is 'admin', not 'staff'.

Answer choices

Why each option matters

Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.

Correct answer & explanation

chgrp staff file

The file's current permissions (-rwxr-----) grant the owner full access and the group 'admin' read-only access, but the user is in the 'staff' group, not 'admin'. To allow the 'staff' group to read the file, the file's group owner must be changed to 'staff' using `chgrp staff file`. This ensures that the group read permission (r--) applies to members of the 'staff' group.

Answer analysis

Option-by-option breakdown

For each option: why learners choose it and why it is or isn't the right answer here.

  • chmod 755 file

    Why it's wrong here

    The `chmod 755 file` command sets permissions to `rwxr-xr-x`, granting read, write, and execute to the owner, and read and execute to both the file's group and all other users. While this provides some access, it does not address the fundamental issue that the file's *group ownership* is incorrect (still 'admin' instead of 'staff'). Consequently, members of the 'staff' group are still treated as 'others' and may not have the appropriate level of access, or the intended group-specific permissions are not applied to them.

  • chmod g+r file

    Why it's wrong here

    The `chmod g+r file` command adds read permission specifically for the file's *current* group owner. If the file is currently owned by the 'admin' group, this command would only grant read access to members of the 'admin' group. Since the user's team belongs to the 'staff' group, which is not the file's group owner, this action would not provide the necessary access to the 'staff' team, as they would still be subject to 'others' permissions.

  • chgrp staff file

    Why this is correct

    The `chgrp staff file` command directly changes the group ownership of the specified file from its current group (e.g., 'admin') to the 'staff' group. By doing so, any existing group permissions (e.g., read, write, execute) associated with the file will now apply to all members of the 'staff' group. This precisely resolves the access issue for the user's team by aligning the file's group ownership with their team's group, granting them the intended access without altering owner or 'others' permissions.

  • chown user:staff file

    Why it's wrong here

    The `chown user:staff file` command changes both the owner of the file to 'user' and its group to 'staff'. While changing the group to 'staff' is a correct step towards resolving the access issue, altering the file's owner to 'user' might be unnecessary or even undesirable. Changing the owner could disrupt existing ownership structures, accountability, or other permissions tied to the original owner, making it a less precise and potentially overreaching solution compared to simply modifying the group ownership.

About these practice questions

This 220-1202 question is part of Courseiva's 495-question bank — original exam-style content with full explanations and wrong-answer analysis, never real exam questions or exam dumps. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

JA

Written by Johnson Ajibi, MSc IT Security

Senior Network & Security Engineer · founder of Courseiva

This 220-1202 practice question is part of Courseiva's free CompTIA certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the 220-1202 exam.