-
Notifications
You must be signed in to change notification settings - Fork 2.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
~/.pm2 is created with root as the owner and completely breaks pm2 #831
Comments
Also related to #712 where pm2 init itself (https://github.com/Unitech/PM2/blob/master/lib/CLI.js#L31). I think this should be called at the A similar use case will be that |
#837 read this too about startup and pm2 user owner ;) |
An easy solution is to add |
Hello, I ran into this issue as well and had to perform a hack to make it work for me.
if the start up file exists already it must be manually removed as follows:
now clear the contents of /root/ pm2 configuration and copy the user configuration over
than i needed to modify the init script as follows to get it to work
cat /etc/init.d/pm2-init.sh
please notice this fix above which resolved the issue
|
I've run into the same thing. I found that this created the init script correctly, and is more elegant than editing the init script:
Unfortunately this command starts a pm2 God daemon before the init script is created, so I'm left with a running pm2 daemon with the wrong settings owned by root that breaks everything because it points at The next problem is that it's hard to stop this daemon nicely because it looks in the wrong place for its config because the init script is now in effect (i.e. A minor issue - why not rename the init script to just |
sudo stuff fixed |
start with a server that has never had pm2 installed (the important part is that there is no ~/.pm2)
at that point, ~/.pm2 has a root owner and if you try to do anything with pm2 after that (e.g.
pm2 ls
) you'll get an EACCES error.my workaround is
this is possibly related to #789
The text was updated successfully, but these errors were encountered: