mirror of
https://github.com/Unitech/pm2.git
synced 2025-12-08 20:35:53 +00:00
Allow mixing of args uid and gid
Reversed the order of setting uid and gid. When uid is set first, the process doesn't have permission to set the gid. So they've been swapped.
This commit is contained in:
parent
9d980e017f
commit
ff6bdd67a4
@ -52,10 +52,10 @@ if (process.connected &&
|
||||
// uid/gid management
|
||||
if (process.env.uid || process.env.gid) {
|
||||
try {
|
||||
if (process.env.uid)
|
||||
process.setuid(process.env.uid);
|
||||
if (process.env.gid)
|
||||
process.setgid(process.env.gid);
|
||||
if (process.env.uid)
|
||||
process.setuid(process.env.uid);
|
||||
} catch(e) {
|
||||
setTimeout(function() {
|
||||
console.error('%s on call %s', e.message, e.syscall);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user