303-300 · Question #53
Which command is used to set the permissions of a file in Linux?
The correct answer is B. chmod. chmod (change mode) sets file permissions in Linux, controlling read, write, and execute access for the owner, group, and others - for example, chmod 755 file.sh or chmod +x script.sh. The distractors each handle a related but distinct task: chown changes file ownership (who…
Question
Which command is used to set the permissions of a file in Linux?
Options
- Achown
- Bchmod
- Cchgrp
- Dsetfacl
How the community answered
(33 responses)- A6% (2)
- B91% (30)
- D3% (1)
Explanation
chmod (change mode) sets file permissions in Linux, controlling read, write, and execute access for the owner, group, and others - for example, chmod 755 file.sh or chmod +x script.sh.
The distractors each handle a related but distinct task: chown changes file ownership (who the file belongs to), chgrp changes the file's group assignment, and setfacl sets Access Control Lists - a more granular permission system layered on top of standard Unix permissions, not the primary mechanism.
Memory tip: Think of the "mod" in chmod as short for modify permissions (the "mode" of a file). If you remember that Unix stores permissions in a field called the file mode, chmod = change mode = change permissions becomes intuitive.
Topics
Community Discussion
No community discussion yet for this question.