-
Notifications
You must be signed in to change notification settings - Fork 694
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
uwsgi creates spooler dirs and leaves them writable by root only #1858
Comments
Please add the uwsgi config |
This is how it happens for me, all config in CLI. uwsgi can't write spool files if --uid option is set and a directory of --spooler doesn't exist, because it will create them as root and then write them as user specified with --uid maybe ?
|
Confirming this also occurred during deployment to production 😂 |
I confirm the same issue for me. I'm using Ubuntu 18.10 and the os package of uwsgi 2.0.17.1 in emperor mode with this configurations If I add the spooler = %(base)/spooler I tried to add The only workaround is to manual create the spooler directory with correct owner before starting the vassal. Maybe we need something similar to |
I think it should just chown them with the uid and gid it will drop privileges to, no need to add a new config imho. |
I think your solution can work. 👍 |
Does it work when using |
I hit this same issue today. Fun ol' timey bug. |
I noticed my deployment broke when i added multiple spoolers, ie. with
--spooler=/spooler/mail --spooler=/spooler/stat
: it would create the mail and stat directories inside /spooler and leave them writable by root only.Then, it seems uwsgi's spooler is stuck in an endless loop trying to write inside this directory after changing uid from root.
Just chown'ing the directories fixes uWSGI startup:
As you can see, it then leaves two working spooler processes (in a container, note that uwsgi started as pid 11):
The text was updated successfully, but these errors were encountered: