Q. What is the octal representation of these -rwx r-s r– permissions?
β
Correct Answer: (D)
2754
Explanation: When the “Set Group ID” bit is set, the executable is run with the authority of the group. For example, if a file belongs to the user group, regardless of who executed it, it would always run with the user’s group authority. Use the chmod command to set the SGID on file1.txt. The octal value is 2000 and the symbolic value is “s”.
String notation:
$ chmod g+s file1.txt
Numeric notation:
$ chmod 2750 file1.txt
String notation:
$ chmod g+s file1.txt
Numeric notation:
$ chmod 2750 file1.txt