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.

Author larry
Recipients benjamin.peterson, larry
Date 2009-04-09.08:36:57
SpamBayes Score 4.8225868e-12
Marked as misclassified No
Message-id <1239266220.34.0.315690768363.issue5676@psf.upfronthosting.co.za>
In-reply-to
Content
The analysis I wrote on 2009/4/6 is correct, but I just discovered
another important detail: it only happens on my ZFS partition.  I'm
using ZFS on Linux, via FUSE.  No wonder I'm the only person it's
happening to!  I don't know whether it's because of FUSE or because of
ZFS; if it's because of ZFS, then more people will see this once the
next rev of OS X hits the streets.

To reproduce:
% mkdir foo
% touch foo/a
% chmod 400 foo
% python -c 'import os ; print(os.listdir("foo"))'

On my ext4 root partition this works, printing
  ['a']
On my ZFS home partition this fails, printing
  Traceback (most recent call last):
    File "<string>", line 1, in <module>
  OSError: [Errno 13] Permission denied: 'foo'

I observe this behavior in Python 2.6.1 and in py3k/trunk.

The attached patch fixes test_shutil so it passes on both partitions. 
The fix: allow the first failure to be *either* os.listdir (in which
case arg must be TESTFN) or os.remove (in which case arg must be
self.childpath).  Patch was written against r71404.
History
Date User Action Args
2009-04-09 08:37:00larrysetrecipients: + larry, benjamin.peterson
2009-04-09 08:37:00larrysetmessageid: <1239266220.34.0.315690768363.issue5676@psf.upfronthosting.co.za>
2009-04-09 08:36:59larrylinkissue5676 messages
2009-04-09 08:36:58larrycreate