If a user, user1 belongs to group1 and also a setuid executable exists that is owned by user1 and group, group2. user1 is not a member of group2.

I am seeing that the executable cannot access files owned by root and group1 (others have no access, (550, root, group1)). Why is this the case? How is the group of a setuid user determined?


The setuid bit changes only the uid and nothing else.

(Also, the kernel does not know which groups user1 belongs to, and there's no standard way for getting that information from userspace. For specific uses, like NFS, daemons like rpc.idmapd or various abuse of request_key can handle such requests, but no generic method has been added.)

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.