Bird
0
0

You want to allow a group to modify a file but not execute it. Which chmod command sets read and write permissions for the group only, leaving others unchanged?

hard📝 Application Q15 of 15
Linux CLI - File Permissions and Ownership
You want to allow a group to modify a file but not execute it. Which chmod command sets read and write permissions for the group only, leaving others unchanged?
Achmod o=rw file.txt
Bchmod g=rw file.txt
Cchmod g+rwx file.txt
Dchmod u=rw file.txt
Step-by-Step Solution
Solution:
  1. Step 1: Understand chmod symbolic mode

    "g=rw" sets group permissions to read and write only, removing execute if present.
  2. Step 2: Check other options

    chmod g+rwx file.txt adds execute permission, which is not wanted. chmod o=rw file.txt changes others' permissions, and chmod u=rw file.txt changes user permissions.
  3. Final Answer:

    chmod g=rw file.txt -> Option B
  4. Quick Check:

    g=rw sets group read/write only [OK]
Quick Trick: Use g=rw to set group read/write without execute [OK]
Common Mistakes:
MISTAKES
  • Using g+rwx adds execute permission
  • Changing user or others instead of group
  • Using + instead of = to overwrite permissions

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Linux CLI Quizzes