QuestionQ45

Basic Unix Skills

Which of the following chmod commands sets the permissions of the file text.txt to 750?

  • A chmod user:rw, group:r, other:x
  • B chmod text.txt=u:rw,g:r,o:r
  • C chmod u=rwx,g=rx,o= text.txt
  • D chmod -u rw -g rx -o - text.txt
  • E chmod text.txt 750
Explanation

Mode 750 assigns rwx to the file owner, rx to the group, and no permissions to others. Symbolic mode u=rwx,g=rx,o= sets those exact permissions.

Community Discussion

No comments yet. Be the first to start the discussion!