python-websockets / websockets

Library for building WebSocket servers and clients in Python
https://websockets.readthedocs.io/
BSD 3-Clause "New" or "Revised" License
5.23k stars 519 forks source link

Nginx Reverse Proxy - Unix Socket - Permission Denied #1517

Closed AhmedERady closed 4 weeks ago

AhmedERady commented 1 month ago

How can nginx read the .sock file if websockets does not give it permission?

AhmedERady commented 1 month ago

Is nginx even capable of reading/writing anything outside of /var/www (Even if they own it)?

aaugustin commented 4 weeks ago

Setting the umask of the Python process with os.umask() should do the job.

nginx can read anywhere, provided the user it's running under has access.