[New-bugs-announce] [issue1545] shutil fails when copying to NTFS in Linux

ianaré report at bugs.python.org
Mon Dec 3 08:08:50 CET 2007


New submission from ianaré:

When using shutil.copy2 or copytree where the source is on a filesystem
that has octal permissions (ie ext3) and the destination is on an NTFS
partition mounted rw, the operation fails with

OSError: [Errno 1] Operation not permitted


I am attaching a version of shutil.py where this has been worked around
by calling copystat like so:

try:
    copystat(src, dst)
except OSError, (n, str):
    # can't change stats on NTFS partition even if
    # OS supports it
    if n == 1:
        pass
    else:
        raise Error, str

----------
components: Library (Lib)
files: shutil1.py
messages: 58112
nosy: ianare
severity: normal
status: open
title: shutil fails when copying to NTFS in Linux
versions: Python 2.5
Added file: http://bugs.python.org/file8859/shutil1.py

__________________________________
Tracker <report at bugs.python.org>
<http://bugs.python.org/issue1545>
__________________________________
-------------- next part --------------
A non-text attachment was scrubbed...
Name: shutil1.py
Type: text/x-python
Size: 6311 bytes
Desc: not available
Url : http://mail.python.org/pipermail/new-bugs-announce/attachments/20071203/0bdfd0be/attachment-0001.py 


More information about the New-bugs-announce mailing list