Antoine Pitrou [EMAIL PROTECTED] added the comment:
Agree with using 0600 as default permissions.
--
nosy: +pitrou
priority: - high
___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue3394
___
Changes by Mark Summerfield [EMAIL PROTECTED]:
--
nosy: +mark
___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue3394
___
___
Python-bugs-list mailing list
Antoine Pitrou [EMAIL PROTECTED] added the comment:
Committed in r65235. Thanks!
--
resolution: - fixed
status: open - closed
___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue3394
___
Changes by Dylan Grose [EMAIL PROTECTED]:
--
nosy: +dkbg
___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue3394
___
___
Python-bugs-list mailing list
Christopher Brannon [EMAIL PROTECTED] added the comment:
Here is a patch containing code and a unit test. I set external_attr
to 0600, for the following reason.
When I extract with Infozip, my umask is ignored when setting permissions of
extracted entries. They have the permissions assigned to
New submission from Stephen Warren [EMAIL PROTECTED]:
Run the following Python script, on Unix/Linux:
==
import zipfile
z = zipfile.ZipFile('zipbad.zip', 'w')
z.writestr('filebad.txt', 'Some content')
z.close()
z = zipfile.ZipFile('zipgood.zip', 'w')
zi =
Stephen Warren [EMAIL PROTECTED] added the comment:
Oops. Forgot to set type field.
--
type: - behavior
___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue3394
___
Christopher Brannon [EMAIL PROTECTED] added the comment:
What value should the new archive entry's external_attr attribute have?
ZipFile.write sets it to the permissions of the file being archived, but
writestr is archiving a string, not a file. Setting it to 0600 lt;lt; 16
seems reasonable.
Stephen Warren [EMAIL PROTECTED] added the comment:
I'd probably argue for at least 066016, if not 066616, since group
permissions are pretty typically set, but even 066616 would be OK,
since the umask on extraction would take away any permissions the
extracting user didn't want.
But, as long