GCFA · Question #202
John works as a professional Ethical Hacker. He has been assigned the project of testing the chmod -rwSr----- secure.c Considering the above scenario, which of the following statements is true?
The correct answer is B. The SUID bit is set, but the owner has no execute permission. In Linux file permissions, an uppercase 'S' in the owner execute bit position means the SUID bit is set but the owner lacks execute permission.
Question
John works as a professional Ethical Hacker. He has been assigned the project of testing the chmod -rwSr----- secure.c Considering the above scenario, which of the following statements is true?
Options
- AThe Sticky bit is set, but other users have no execute permission.
- BThe SUID bit is set, but the owner has no execute permission.
- CThe Sticky bit is set and other users have the execute permission.
- DThe SGID bit is set, but the group execute permission is not set.
How the community answered
(66 responses)- A11% (7)
- B83% (55)
- C2% (1)
- D5% (3)
Why each option
In Linux file permissions, an uppercase 'S' in the owner execute bit position means the SUID bit is set but the owner lacks execute permission.
The sticky bit appears as 'T' or 't' in the others execute position, not in the owner position - the permission string shows no such character in the others field.
The permission string '-rwSr-----' shows an uppercase 'S' in the owner's execute position, which means the Set-User-ID (SUID) bit is enabled but the owner does not have execute permission. If the owner also had execute rights, the character would be a lowercase 's'. This distinction is critical for understanding how special permission bits interact with execute bits.
The sticky bit is not present in this permission string at all, and the others field shows '---', confirming other users have no permissions whatsoever.
The SGID bit would appear in the group execute position (the sixth character field), but the group field here shows 'r--' with no special bit indicator.
Concept tested: Linux SUID bit vs execute permission uppercase S flag
Source: https://man7.org/linux/man-pages/man1/chmod.1.html
Topics
Community Discussion
No community discussion yet for this question.