This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author christian.heimes
Recipients brett.cannon, christian.heimes, serhiy.storchaka, socketpair, vstinner
Date 2017-01-10.21:22:29
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1484083349.75.0.164130405752.issue29214@psf.upfronthosting.co.za>
In-reply-to
Content
Victor, you are correct. That was exactly my point.

The most secure way is to tighten security and set umask to 0o077. It's basically a white list or locked down approach. With umask 0o077 all subsequent files, directories and other resources will be created without any permission for group and others. This is even true for operations that create a Unix socket.

You have to change the permission of files to a more permissive mode explicitly. Any mistake is easy to spot (access denied) and not catastrophic.

By the way fchmod() isn't necessarily the optimal way to change permission by file descriptor. The behavior of fchmod() isn't well defined for socket files. On Linux fchmod() of a Unix socket file does not alter the permission bits of the socket device file.
History
Date User Action Args
2017-01-10 21:22:29christian.heimessetrecipients: + christian.heimes, brett.cannon, vstinner, socketpair, serhiy.storchaka
2017-01-10 21:22:29christian.heimessetmessageid: <1484083349.75.0.164130405752.issue29214@psf.upfronthosting.co.za>
2017-01-10 21:22:29christian.heimeslinkissue29214 messages
2017-01-10 21:22:29christian.heimescreate