Set the group and user id if specified