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.

classification
Title: mailbox._singlefileMailbox.flush doesn't preserve file rights
Type: behavior Stage: resolved
Components: email, Library (Lib) Versions: Python 3.2, Python 3.3, Python 2.7
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: Nosy List: BreamoreBoy, barry, petri.lehtinen, python-dev, r.david.murray, wRAR
Priority: normal Keywords: patch

Created on 2009-02-22 15:48 by wRAR, last changed 2022-04-11 14:56 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
issue5346.patch petri.lehtinen, 2012-06-26 08:25
Messages (6)
msg82604 - (view) Author: Andrey Rahmatullin (wRAR) Date: 2009-02-22 15:48
Mbox file is recreated during flush(), so the new file has access 
rights according to umask, which is not necessarily the same as of the 
old file.
msg109756 - (view) Author: Mark Lawrence (BreamoreBoy) * Date: 2010-07-09 15:46
What platform is this on?
msg109779 - (view) Author: Andrey Rahmatullin (wRAR) Date: 2010-07-09 18:39
Linux
msg164056 - (view) Author: Petri Lehtinen (petri.lehtinen) * (Python committer) Date: 2012-06-26 08:25
Attached a patch. It copies the mode of the original mailbox file to the new file on flush().
msg164326 - (view) Author: Roundup Robot (python-dev) (Python triager) Date: 2012-06-29 12:16
New changeset 69f654f718f4 by Petri Lehtinen in branch '2.7':
#5346: Preserve permissions of mbox, MMDF and Babyl mailbox files on flush()
http://hg.python.org/cpython/rev/69f654f718f4

New changeset 13fb85ef0eea by Petri Lehtinen in branch '3.2':
#5346: Preserve permissions of mbox, MMDF and Babyl mailbox files on flush()
http://hg.python.org/cpython/rev/13fb85ef0eea

New changeset 23beb7f8561a by Petri Lehtinen in branch 'default':
#5346: Preserve permissions of mbox, MMDF and Babyl mailbox files on flush()
http://hg.python.org/cpython/rev/23beb7f8561a
msg164327 - (view) Author: Petri Lehtinen (petri.lehtinen) * (Python committer) Date: 2012-06-29 12:16
Fixed.
History
Date User Action Args
2022-04-11 14:56:46adminsetgithub: 49596
2012-06-29 12:16:45petri.lehtinensetstatus: open -> closed
resolution: fixed
messages: + msg164327

stage: patch review -> resolved
2012-06-29 12:16:23python-devsetnosy: + python-dev
messages: + msg164326
2012-06-26 08:25:05petri.lehtinensetfiles: + issue5346.patch

components: + email
versions: + Python 3.3, - Python 3.1
keywords: + patch
nosy: + barry, r.david.murray

messages: + msg164056
stage: test needed -> patch review
2012-06-18 17:42:37petri.lehtinensetnosy: + petri.lehtinen
2010-07-09 18:39:46wRARsetmessages: + msg109779
2010-07-09 15:46:50BreamoreBoysetstage: test needed
versions: + Python 3.1, Python 2.7, Python 3.2, - Python 2.5
2010-07-09 15:46:20BreamoreBoysetnosy: + BreamoreBoy
messages: + msg109756
2009-02-22 15:48:39wRARcreate