[issue36823] shutil.copytree copies directories and files but fails with that same directory with '[Errno 1] Operation not permitted')

Ryan Avery report at bugs.python.org
Mon May 6 23:47:46 EDT 2019


New submission from Ryan Avery <ravery at ucsb.edu>:

I am trying to use shutil.copytree on an Azure VM that has Azure FileStorage mounted with SMB 3.0. When I run the following to copy directories from one location on my Azure File Storage to another location on my File Storage, the whole directory, subdirectory, and files are copied succesfully but then this errors on those very same files:

shutil.copytree(
    os.path.join(wflow.TRAIN, 'tile_512-4608'), 
    os.path.join(wflow.TEST, 'tile_512-4608')
)

Error: [('/mnt/point/landsat-1024-cp/train/tile_512-4608/image', '/mnt/point/landsat-1024-cp/test/tile_512-4608/image', '[Errno 1] Operation not permitted'), ('/mnt/point/landsat-1024-cp/train/tile_512-4608/mask', '/mnt/point/landsat-1024-cp/test/tile_512-4608/mask', '[Errno 1] Operation not permitted'), ('/mnt/point/landsat-1024-cp/train/tile_512-4608', '/mnt/point/landsat-1024-cp/test/tile_512-4608', '[Errno 1] Operation not permitted')]

After this error, all of the items listed above were actually copied so I'm not sure why this errors

----------
components: Library (Lib)
messages: 341677
nosy: rbavery
priority: normal
severity: normal
status: open
title: shutil.copytree copies directories and files but fails with that same directory with '[Errno 1] Operation not permitted')
type: behavior
versions: Python 3.7

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue36823>
_______________________________________


More information about the Python-bugs-list mailing list