Bird
0
0

If a file has permission notation rwxrwxr--, which numeric (octal) command would set the same permissions using chmod?

hard📝 Application Q9 of 15
Linux CLI - File Permissions and Ownership
If a file has permission notation rwxrwxr--, which numeric (octal) command would set the same permissions using chmod?
Achmod 764 filename
Bchmod 775 filename
Cchmod 777 filename
Dchmod 774 filename
Step-by-Step Solution
Solution:
  1. Step 1: Convert owner permissions 'rwx'

    Read(4) + Write(2) + Execute(1) = 7.
  2. Step 2: Convert group permissions 'rwx'

    Same as owner = 7.
  3. Step 3: Convert others permissions 'r--'

    Read(4) only = 4.
  4. Step 4: Combine octal digits

    Owner=7, Group=7, Others=4 -> 774.
  5. Final Answer:

    chmod 774 filename -> Option D
  6. Quick Check:

    rwx=7, rwx=7, r--=4 [OK]
Quick Trick: Sum permissions per group for chmod number [OK]
Common Mistakes:
  • Using 775 instead of 774
  • Confusing others' permissions

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Linux CLI Quizzes