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

2019-05-06 Thread Ryan Avery


New submission from Ryan Avery :

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 
<https://bugs.python.org/issue36823>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



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

2019-05-07 Thread Ryan Avery


Ryan Avery  added the comment:

I'm actually not sure what the expected behavior would be, because I can
use the os module to copy, rename, and remove files and folders in this
mounted File Share. Before encountering this error, I would expect shutil
to do the same. But since this error comes up it would make more sense for
shutil to not copy anything.

Here are the permissions for the mounted directory, which is "."
drwxrwxrwx 2 root root0 May  3 17:44 .
drwxr-xr-x 4 root root 4096 May  3 17:57 ..
drwxrwxrwx 2 root root0 Apr  8 22:07 external
drwxrwxrwx 2 root root0 May  7 00:16 landsat-1024-cp
drwxrwxrwx 2 root root0 Apr  8 23:02 regional_annotation_projects
drwxrwxrwx 2 root root0 May  3 21:08 results
drwxrwxrwx 2 root root0 May  3 03:53 western_nebraska_landsat_scenes

On Tue, May 7, 2019 at 2:01 AM Windson Yang  wrote:

>
> Windson Yang  added the comment:
>
> Just to make sure, the expected behavior would be the items should not be
> copied because of the permission and the error messages above, right?
>
> --
> nosy: +Windson Yang
>
> ___
> Python tracker 
> <https://bugs.python.org/issue36823>
> ___
>

--

___
Python tracker 
<https://bugs.python.org/issue36823>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com