Skip to content

Commit

Permalink
Operation not permitted on call setgid, fix: Unitech#2957
Browse files Browse the repository at this point in the history
  • Loading branch information
guard43ru authored and remz committed Dec 29, 2020
1 parent 504087c commit af33079
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/ProcessContainer.js
Original file line number Diff line number Diff line change
Expand Up @@ -86,10 +86,10 @@ delete process.env.pm2_env;
// uid/gid management
if (pm2_env.uid || pm2_env.gid) {
try {
if (pm2_env.uid)
process.setuid(pm2_env.uid);
if (process.env.gid)
process.setgid(pm2_env.gid);
if (pm2_env.uid)
process.setuid(pm2_env.uid);
} catch(e) {
setTimeout(function() {
console.error('%s on call %s', e.message, e.syscall);
Expand Down

0 comments on commit af33079

Please sign in to comment.