-
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
Unix socket owner, not the "run-as-user" user #716
Comments
Which socket are you talking about? The apache socket that handles the proxy? That's up to you to give it the correct rights. |
The unix socket that gets created by node |
Where is this socket located? Is this a pm2 unix socket? |
I put all my sockets in /var/run/nodejs/sockets/ pm2 socket? They are created from my nodejs code,
Where config.socket is my unix socket file, /var/run/nodejs/sockets/user.sock |
My advice is that pm2 and the application runs with the same user to avoid |
I understand but what is the point of run_as_user then ? I'm managing multiple application own by specifics users, so managing PM2 with root with run_as_user seems to logical way to go. I need to use a script which changes the rigths on the socket after creation, the problem with this is that if PM2 restart a node app because of a crash, the app won't work because the rights on the socket are eroneous. Do you have other ideas cause I really want to use PM2, it's so usefull. |
Still beta? ;-( |
I manage PM2 with the root user and start my node app with the run_as_user and run_as_group flags.
So when the app is started with those flags set for a different user than root, everything is ok except that the socket created is own by root and not the specify user. This is causing me problems since i'm using Apache which is proxying the specify user to the socket but it doesn't have any rigths on it.
I think to socket creation should take into account the run_as_user flag for socket creation.
The text was updated successfully, but these errors were encountered: