Package: python2.5
Version: 2.5-5
Severity: normal
Hi,
the mailbox module in python 2.5 cannot modify mboxes in read-only
directories, e.g. the system mail spool. This is because
mailbox._singlefileMailbox.flush() tries to write the modified mailbox
to a temporary file and then rename it. See:
penelope[tmp]$ python2.5
Python 2.5 (release25-maint, Dec 9 2006, 14:35:53)
[GCC 4.1.2 20061115 (prerelease) (Debian 4.1.1-20)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import mailbox
>>> mbox = mailbox.mbox("/var/mail/nikolaus")
>>> mbox.clear()
>>> mbox.close()
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/lib/python2.5/mailbox.py", line 623, in close
self.flush()
File "/usr/lib/python2.5/mailbox.py", line 570, in flush
new_file = _create_temporary(self._path)
File "/usr/lib/python2.5/mailbox.py", line 1885, in _create_temporary
os.getpid()))
File "/usr/lib/python2.5/mailbox.py", line 1875, in _create_carefully
fd = os.open(path, os.O_CREAT | os.O_EXCL | os.O_RDWR)
OSError: [Errno 13] Permission denied:
'/tmp/mail/nikolaus.1195061622.penelope.4241'
>>>
See also bug #451204. It pretty much looks like no one has ever tested
mailbox.py with such scenarios. :-(
Nikolaus
-- System Information:
Debian Release: 4.0
APT prefers stable
APT policy: (500, 'stable')
Architecture: i386 (i686)
Shell: /bin/sh linked to /bin/bash
Kernel: Linux 2.6.18-5-k7
Locale: [EMAIL PROTECTED], [EMAIL PROTECTED] (charmap=ISO-8859-15)
Versions of packages python2.5 depends on:
ii libbz2-1.0 1.0.3-6 high-quality block-sorting file co
ii libc6 2.3.6.ds1-13etch2 GNU C Library: Shared libraries
ii libdb4.4 4.4.20-8 Berkeley v4.4 Database Libraries [
ii libncursesw5 5.5-5 Shared libraries for terminal hand
ii libreadline5 5.2-2 GNU readline and history libraries
ii libsqlite3-0 3.3.8-1.1 SQLite 3 shared library
ii libssl0.9.8 0.9.8c-4etch1 SSL shared libraries
ii mime-support 3.39-1 MIME files 'mime.types' & 'mailcap
ii python2.5-minimal 2.5-5 A minimal subset of the Python lan
python2.5 recommends no packages.
-- no debconf information
--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]