code: function setupUGID(uid, gid) {
      if (uid) {
          if (!gid) {
              gid = uid;
          }
  
          try {
              process.setgid(gid);
              util.log('changed gid to ' + gid);
              process.setuid(uid);
              util.log('changed uid to ' + uid);
          } catch (e) {
              util.log('Failed to set uid/gid to ' + [uid, gid].join('/') +
                  ' Error: ' + e.message);
          }
      }
  }
docs: su/sudo/start-stop-daemon work too badly with upstart
  and setuid is only available in > 1.4, hence this