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

Logto2 failing to drop privileges if chdir() fails #857

Open
pakal opened this issue Feb 27, 2015 · 0 comments
Open

Logto2 failing to drop privileges if chdir() fails #857

pakal opened this issue Feb 27, 2015 · 0 comments

Comments

@pakal
Copy link

pakal commented Feb 27, 2015

I have a very weird bug : when I prepare the deployment of a uwsgi app, by configuring uwsgi but before uploading the dir with application files (so chdir fails), the logto2 file gets created as root instead of the wanted unprivileged user.

Here is the normal error appearing in logs:
--/etc/uwsgi-emperor/_::fitmanager_prod.ini - chdir(): No such file or directory [core/uwsgi.c line 2525]

I've played with log-chown and stuffs, nothing of this changes, but when I create the folder targeted by chdir, all goes back to normal, user and chmod changes work as documented.

in /etc/uwsgi-emperor/vassals-defaults.ini

log-master = on
logfile-chown = yes
logfile-chmod = 644
log-date = %Y-%m-%d_%H:%M:%S
log-reopen = on

in application.ini

include = /etc/uwsgi-emperor/vassals-defaults.ini
uid = www-data
gid = www-data
chdir = /opt/%(appname)/wsgi/
logto2 = /var/log/fitmanager/%(appname).log

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

1 participant