Trying to understand why ssh-agent has sgid bit and found this post ssh-agent has sgid
I have another question, why the group ownership of ssh-agent is nobody not root? What is the reason behind it? Will it still work if group ownership is root?
If it were setgid root then the agent would run as group
Setting the group ownership to
I imagine it would still work with setgid root. I just tried that here, and it didn't complain at all and seemed to work in cursory testing. That said, I can't think of any actual reason to change it to that - everyone seems to be better off with it running as group
I don't suggest changing the permissions of files installed by your package manager, in any case, because they tend to get upset about any modifications to the files they control.
The point of making
The best way to run a program setgid without having an impact on other programs is to use a dedicated group. That's what Debian does, for example: