umask of messages
Tim Gray
lists+offimap at protozoic.com
Thu Sep 1 13:24:36 BST 2011
On Sep 01, 2011 at 10:41 AM +0200, Sebastian Spaeth wrote:
>python -c "import os; print ('%03o' % os.umask(0))"
>
>Mine says 022 (pretty common) and that leads to a default mode of 755
>when writing out a file, so perhaps the system default has changed for
>you?
Yeah, mine is 022 as well. However, if running:
python -c "open('test.txt', 'w')"
results in a file with a umask of 644. Which is the same thing I get if
I run `touch test.txt` from the command line. As I said, I don't really
care that much if my messages are executable. However, it is strange
and something I've not seen before, either in my Python scripts or in
general Unix usage. Also, I thought a umask of 022 results in files
with 644 (666 - 022 = 644).
So I guess my question has another part: Are you guys seeing 755 umasks on
the messages?
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 881 bytes
Desc: not available
URL: <http://alioth-lists.debian.net/pipermail/offlineimap-project/attachments/20110901/0836e335/attachment-0001.sig>
More information about the OfflineIMAP-project
mailing list