This repository was archived by the owner on Nov 23, 2017. It is now read-only.
This repository was archived by the owner on Nov 23, 2017. It is now read-only.
set unix socket permissions during binding of the UNIX-socket #426
Open
Description
Unfortunatelly this is not so easy.
- Safe, but (seems?) undocumented way in Linux -- is to call
os.fchmod(socket.fileno())
BEFOREbind()
+ setumask
to proper value. Since umask is not thread safe (affect all threads) that action should be done infork()
... - Portable way -- is to call
os.chmod(path)
after binding. But this will leave socket with wrong permissions during small amount of time.
Socket write permissions are required in order unprivileged process to connect to it.
Metadata
Metadata
Assignees
Labels
No labels