[Flask] Uwsgi emperor socket creation permissions

Corey Boyle coreybrett at gmail.com
Sun May 26 10:11:40 EDT 2019


Took me some experimentation, but found something that appears to work.

I created a new group and made appuser and www-data members.

Then I tried using "chown-socket=appuser:newgroup", but that didn't
work and made the Emperor curse the vassel.

I had to change the ownership of the vassel's ini file to
appuser:newgroup, and that did the trick.

I am using "chmod-socket=660" in the ini, and that seems to work fine.

Having to create the special group seems like an extra step, but I
guess that could be automated.

On Sat, May 25, 2019 at 5:09 PM Rodrigo Ramírez Norambuena
<decipher.hk at gmail.com> wrote:
>
> On Sat, May 25, 2019 at 12:11 PM Corey Boyle <coreybrett at gmail.com> wrote:
> >
> > Thank you for the suggestion. I've read that the uwsgi binary protocol via a Unix sockit is more efficient than HTTP. So I'd like to have my cake and eat it too. ;-) HTTP may be my fallback plan if I can't figure this out.
> >
>
> Should be more efficient...but really need the extra performance?
>
> For this point, the uwsgi.ini file should be came a same permission
> user:group.  I remember having a problem in Centos 7 for this
> situation.
>
> If run for the  normal users system you can move the socket another
> places, example /var/run/.... with the Nginx user/group names
> permission.  Or add the users in a group for uwsgi where www-data be
> part of this group too
>
> So, if you can share some information about your environment system
> (O.S.), Python Version, some configuration could be help to take a
> look
> Regards!
> --
> Rodrigo Ramírez Norambuena
> http://www.rodrigoramirez.com/


More information about the Flask mailing list