Initial Checks
Discussion Link
I asked about this on the Discord, but didn't receive a reply after several days. Sorry if this isn't the right place.
Description
When the --uds option is used Uvicorn creates a socket with 766 permissions, accessible to any user on the server, and this does not appear to be configurable. What is the recommended way to restrict a socket to 760 or similar?
I could separately chmod the socket after it is created, but this leads to tricky questions about error detection and handling if the chmod doesn't happen for some reason.
Example Code
Python, Uvicorn & OS Version
Fedora 41
Python 3.12.11
Uvicorn 0.37.0
Initial Checks
Discussion Link
Description
When the
--udsoption is used Uvicorn creates a socket with 766 permissions, accessible to any user on the server, and this does not appear to be configurable. What is the recommended way to restrict a socket to 760 or similar?I could separately chmod the socket after it is created, but this leads to tricky questions about error detection and handling if the chmod doesn't happen for some reason.
Example Code
Python, Uvicorn & OS Version