GSEC · Question #20
What would the file permission example "rwsr-sr-x" translate to in absolute mode?
The correct answer is B. 6755. The permission string 'rwsr-sr-x' encodes SUID and SGID special bits plus standard read/write/execute permissions, translating to absolute octal mode 6755.
Question
What would the file permission example "rwsr-sr-x" translate to in absolute mode?
Options
- A1755
- B6755
- C6645
- D1644
How the community answered
(36 responses)- A3% (1)
- B83% (30)
- C8% (3)
- D6% (2)
Why each option
The permission string 'rwsr-sr-x' encodes SUID and SGID special bits plus standard read/write/execute permissions, translating to absolute octal mode 6755.
1755 represents the sticky bit (value 1) with rwxr-xr-x permissions; the sticky bit appears as 't' in the others execute position, not 's' in owner and group positions.
The symbolic string breaks into owner 'rws' (read+write+execute with SUID = 7), group 'r-s' (read+execute with SGID = 5), and others 'r-x' (read+execute = 5). The lowercase 's' in the owner execute position indicates the SUID bit (value 4) and the 's' in the group execute position indicates the SGID bit (value 2), producing a special-bit prefix of 6. Combined, this yields 6755 in absolute octal notation.
6645 would imply SUID+SGID with rw-r--r-x permissions, but the lowercase 's' in the owner position confirms the execute bit is set, making the owner octet 7 not 6.
1644 represents the sticky bit with rw-r--r-- permissions, which matches neither the SUID+SGID special bits nor the execute permissions visible in the symbolic string.
Concept tested: Linux SUID SGID special permission bits absolute octal mode
Source: https://www.man7.org/linux/man-pages/man1/chmod.1.html
Topics
Community Discussion
No community discussion yet for this question.