XK0-005 · Question #429
A Linux administrator needs to give the correct permission on a file called exam.txt. The owner needs to have full permissions to the file, the group only needs read and execute permissions, and…
The correct answer is C. chmod 750 exam.txt. To apply specific file permissions where the owner has full access, the group has read and execute, and others have no access, the chmod command with octal 750 is used.
Question
A Linux administrator needs to give the correct permission on a file called exam.txt. The owner needs to have full permissions to the file, the group only needs read and execute permissions, and others will not have any permissions. Which of the following commands should the administrator use to accomplish this task?
Options
- Achmod 644 exam.txt
- Bchmod 650 exam.txt
- Cchmod 750 exam.txt
- Dchmod 760 exam.txt
How the community answered
(51 responses)- A14% (7)
- B8% (4)
- C76% (39)
- D2% (1)
Why each option
To apply specific file permissions where the owner has full access, the group has read and execute, and others have no access, the `chmod` command with octal `750` is used.
`chmod 644` grants read and write to the owner (missing execute), read to the group, and read to others, which does not meet the specified requirements.
`chmod 650` grants read and write to the owner (missing execute), read and execute to the group, and no permissions to others, failing the owner's full permission requirement.
The `chmod 750 exam.txt` command sets permissions using octal notation: `7` (rwx) grants full permissions to the owner, `5` (rx) grants read and execute permissions to the group, and `0` grants no permissions to others, precisely matching the requirements.
`chmod 760` grants full permissions to the owner, read and write to the group (missing execute and adding write), and no permissions to others, which does not match the group's required permissions.
Concept tested: Linux file permissions (chmod octal)
Source: https://man7.org/linux/man-pages/man1/chmod.1.html
Topics
Community Discussion
No community discussion yet for this question.