Home / Programming MCQs / Linux MCQs / Question

V

Virat Bhati • 7.23K Points
Tutor III

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

(A) 0777
(B) 2766
(C) 2744
(D) 2754
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

You must be Logged in to update hint/solution

Discusssion

Login to discuss.