0

I am learning about permissions in Linux recently and countered a confused problem about SUID and SGID.

As far as I know, when the SUID is set in the owner permissions, and the file is executable, processes which run it will have effective user id base on user who owns the file. For the SGID, it behaves the same way as SUID (executable files), except the group is affected instead.

But when I tried this: SGID didn't work

As you can see, the "ls" program show two uppercase "S" since the owner and group both can't execute "show_resugid". But why the effective user id changed and the effective group id didn't?

I searched with Google and failed to find the answer. Can you tell me where to find the corresponding manual/doc or teach me about it?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.