I get that setuid on a binary executable allows the process to get the effective uid of the binary owner. What I cannot understand is what if setuid bit is off but setgid bit is on for a particular executable. What happens in this case? Example:Suppose we have following permissionsls -l my_binr-xr-s--- root wheel my_binNow suppose user userA is a a member of group wheel. What happens when userA tries to run this program?I am thinking that the effective user id of this process will become the same as uid for the user by the name wheel. It is a contrived example but I am confused by how group rights alter the effective uid or whether they have any impact on effective uid at all.
Meaning of setgid on an executable
setgid