GPEN · Question #342
John works as a professional Ethical Hacker. He has been assigned a project to test the security secure.c Considering the above scenario, which of the following statements are true? Each correct answe
The correct answer is B. John is providing all rights to the owner of the file. C. By the octal representation of the file access permission, John is restricting the group. A chmod value of 741 grants the owner all three permissions (rwx), restricts the group to read-only (r--), and grants others execute-only (--x).
Question
John works as a professional Ethical Hacker. He has been assigned a project to test the security secure.c Considering the above scenario, which of the following statements are true? Each correct answer represents a complete solution. Choose all that apply.
Options
- AJohn is restricting a guest to only write or execute the secure.c file.
- BJohn is providing all rights to the owner of the file.
- CBy the octal representation of the file access permission, John is restricting the group
- DThe textual representation of the file access permission of 741 will be -rwxr--rw-.
How the community answered
(22 responses)- A14% (3)
- B77% (17)
- D9% (2)
Why each option
A chmod value of 741 grants the owner all three permissions (rwx), restricts the group to read-only (r--), and grants others execute-only (--x).
Others receive the octal digit 1, which maps to binary 001 or execute-only (--x); the statement falsely claims others can write to the file, which is not granted.
The octal digit 7 assigned to the owner decomposes to binary 111, mapping directly to read, write, and execute permissions, meaning the owner holds all possible rights on the file.
The octal digit 4 assigned to the group decomposes to binary 100, which maps to read-only (r--), effectively restricting the group from writing to or executing the file.
The correct textual representation of 741 is -rwxr----x, not -rwxr--rw-; the others field is 1 (--x, execute only) and not rw- (read-write).
Concept tested: Linux file permission octal notation and chmod interpretation
Source: https://man7.org/linux/man-pages/man1/chmod.1.html
Topics
Community Discussion
No community discussion yet for this question.