instance: handle setgid() before setuid()