From 68ef96a35bc72cf76145988bdf229a76791a9f57 Mon Sep 17 00:00:00 2001 From: Tim Caswell Date: Mon, 19 Jul 2010 10:31:50 -0700 Subject: [PATCH] Must change gid before uid. Once you change your uid, it's hard to change your gid. --- bin/spark | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/bin/spark b/bin/spark index a778304..851bbf6 100755 --- a/bin/spark +++ b/bin/spark @@ -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); + } }