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 Gerrit.Holl
Recipients Gerrit.Holl
Date 2015-06-30.12:07:20
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
`shutil.copystat` fails on [panfs]( if the source file lacks u+w, because setting extended attributes results in a `PermissionError`.  This leads to higher end functions such as `shutil.copytree` to fail.  More seriously, it leads to `pip install .` to fail, as I [reported here](

    In [55]: shutil.copystat("/src/on/panfs", "/tmp/fubar")
    PermissionError                           Traceback (most recent call last)
    <ipython-input-55-139c9fc77184> in <module>()
    ----> 1 shutil.copystat("/home/users/gholl/checkouts/pyatmlab/.git/objects/pack/pack-c1449559ec4287b3830efe2913608dddf2f21391.pack", "/tmp/fubar")
    /home/users/gholl/lib/python3.4/ in copystat(src, dst, follow_symlinks)
        211             else:
        212                 raise
    --> 213     _copyxattr(src, dst, follow_symlinks=follow)
        215 def copy(src, dst, *, follow_symlinks=True):
    /home/users/gholl/lib/python3.4/ in _copyxattr(src, dst, follow_symlinks)
        151             try:
        152                 value = os.getxattr(src, name, follow_symlinks=follow_symlinks)
    --> 153                 os.setxattr(dst, name, value, follow_symlinks=follow_symlinks)
        154             except OSError as e:
        155                 if e.errno not in (errno.EPERM, errno.ENOTSUP, errno.ENODATA):
    PermissionError: [Errno 13] Permission denied: '/tmp/fubar'

This occurs for any source file where the user write bit is not set.

Now, I'm not sure if this should be addressed in `pip`, `shutil.copytree`, `shutil.copystat`, `setxattr`, `panfs`, or in none of the above.  I'm reporting it in different places; please close this issue if this is the wrong place.
Date User Action Args
2015-06-30 12:07:21Gerrit.Hollsetrecipients: + Gerrit.Holl
2015-06-30 12:07:21Gerrit.Hollsetmessageid: <>
2015-06-30 12:07:21Gerrit.Holllinkissue24538 messages
2015-06-30 12:07:20Gerrit.Hollcreate