handle setuidgid errors consistently