Only do uid and gid if specified