Skip to content

Commit

Permalink
Must change gid before uid.
Browse files Browse the repository at this point in the history
Once you change your uid, it's hard to change your gid.
  • Loading branch information
creationix committed Jul 19, 2010
1 parent d441479 commit 68ef96a
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions bin/spark
Original file line number Diff line number Diff line change
Expand Up @@ -270,14 +270,14 @@ function enableSSL(app, env) {

function changeUser() {
// user / group
if (env.uid) {
log('user [bold]{' + env.uid + '}');
process.setuid(env.uid);
}
if (env.gid) {
log('group [bold]{' + env.gid + '}');
process.setgid(env.gid);
}
if (env.uid) {
log('user [bold]{' + env.uid + '}');
process.setuid(env.uid);
}
}


Expand Down

0 comments on commit 68ef96a

Please sign in to comment.