Courseiva
Operating Systems →easyMultiple Choice

220-1102 Operating Systems Practice Question

A Linux administrator needs to change the permissions of a script file named 'script.sh' so that the owner has read, write, and execute permissions; the group has read and execute permissions; and all other users have no permissions. Which of the following commands will achieve the desired permissions?

⚠ Common exam trap

Candidates often confuse the octal values for group and others, mistakenly using 755 (which grants others read and execute) instead of 750 (which denies all access to others), because they focus on the owner and group permissions and forget to zero out the others digit.

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

✓

chmod 750 script.sh

The command 'chmod 750 script.sh' sets the permissions to rwxr-x---, which grants the owner read, write, and execute (7), the group read and execute (5), and others no permissions (0). This matches the requirement exactly because the numeric mode 750 uses octal notation where each digit represents the sum of read (4), write (2), and execute (1) permissions for owner, group, and others respectively.

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 750 script.sh

    Why this is correct

    chmod 750 is correct because the numeric mode 7 (owner) grants read, write, and execute; 5 (group) grants read and execute; and 0 (others) removes all permissions. This precisely matches the requirement that only the owner has full control, the group can read/execute the script, and no other users have any access. The execute bit on the group is appropriate for a script that needs to be run, while the zero for others ensures they cannot even read the file's contents.

  • ✗

    chmod 755 script.sh

    Why it's wrong here

    chmod 755 is wrong because the mode 7-5-5 grants others read and execute (r-x). While the owner and group permissions are correct, the others category receives both read and execute, allowing any user on the system to run the script and inspect its code. The requirement explicitly states others should have no permissions, so the fifth digit should be 0, not 5; 755 is a common default but too permissive for this scenario.

  • ✗

    chmod 754 script.sh

    Why it's wrong here

    chmod 754 is wrong because the mode 7-5-4 grants others read-only (r--). Although this denies execute access, it still allows other users to read the script's contents, which violates the requirement that others have no permissions. For a script, read permission alone also enables copying or viewing sensitive logic, even if execution is blocked. The others digit must be 0 to fully disallow access.

  • ✗

    chmod 751 script.sh

    Why it's wrong here

    chmod 751 is wrong because the mode 7-5-1 grants others execute-only (--x). This means other users can run the script, even though they cannot read it—an unusual and generally inadequate permission set for a script because the shell/interpreter typically needs read access to the file. Moreover, the requirement demands no permissions at all for others, and execute is a permission, so 751 fails the explicit requirement.

About these practice questions

One of 925 original 220-1102 practice questions on Courseiva, each with a full explanation and wrong-answer analysis — not exam dumps or protected exam content. 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-1102 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-1102 exam.