[issue3228] mailbox.mbox creates files with execute bit set

Jack Diederich report at bugs.python.org
Fri Aug 1 22:28:54 CEST 2008


Jack Diederich <jackdied at gmail.com> added the comment:

mailbox.py uses os.open instead of the builtin open() because it wants
to pass the exclusive flag (O_EXCL).  As a result your 0077 umask gets
combined with the default of 0777 like this:

0777 & ~0077 == 0700 == '-rwx------'

So you probably want to change your default umask when creating
mailboxes.  Or submit a patch to mailbox.py to allow a different default
mode ;)

----------
nosy: +jackdied

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue3228>
_______________________________________


More information about the Python-bugs-list mailing list