Skip to content
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

Forbid normal user access. #1060

Closed
caizixian opened this issue Mar 2, 2015 · 2 comments
Closed

Forbid normal user access. #1060

caizixian opened this issue Mar 2, 2015 · 2 comments

Comments

@caizixian
Copy link

What I want:
Run pm2 daemon as root and my web app as www-data.
Only users who have root privilege can control the web app.

But in current version of pm2:
Any user can stop or restart a web-app even it's controlled by root.

Unitech added a commit that referenced this issue Jul 2, 2017
…ia --uid --gid (CLI+JSON) + pm2 install --uid / --gid
@Unitech
Copy link
Owner

Unitech commented Jul 2, 2017

Feature added in upcoming PM2. To try it:

(Make sure pm2 is run as root to manipulate uid and gid)

$ pm2 save
$ pm2 kill
$ npm install Unitech/pm2#development -g
$ sudo pm2 resurrect
$ sudo pm2 start app --uid <uid>
# Now pm2 ls display the user running the script
$ pm2 ls

Feedback is welcome

@caizixian
Copy link
Author

Thank you for implementing this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants