Q. What is the octal representation of these -rwx r-s r– permissions?

  • (A) 0777
  • (B) 2766
  • (C) 2744
  • (D) 2754
πŸ’¬ Discuss
βœ… 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
Explanation by: Virat Bhati
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

πŸ’¬ Discussion


πŸ“Š Question Analytics

πŸ‘οΈ
374
Total Visits
πŸ“½οΈ
4 y ago
Published
πŸŽ–οΈ
Virat Bhati
Publisher
πŸ“ˆ
90%
Success Rate