Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
Unable to move files in volume directory in Windows docker container #1058
File move succeeds.
File move fails with
Diagnostic ID : F74EE66C-752F-4676-B9C3-2D44D291D24C/2017-09-01_19-21-39
Steps to reproduce the behavior
PS C:\volume> Move-Item file.txt file2.txt Move-Item : Access to the path is denied. At line:1 char:1 + Move-Item file.txt file2.txt + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : PermissionDenied: (C:\volume\file.txt:FileInfo) [Move-Item], UnauthorizedAccessException + FullyQualifiedErrorId : MoveFileInfoItemUnauthorizedAccessError,Microsoft.PowerShell.Commands.MoveItemCommand
In non volume directory move succeeds.
I'll be first to admit I'm not a Windows security/system expert, so maybe using
Since the folder was created by your
When I was running into the same issue, I could make files and folders within the mounted volume. So it was weird that moving/renaming files was forbidden. But again I'm not an expert on how that's handled in Windows. Maybe someone with more knowledge in that regard can chime in. I wasn't able to find anything around permissions for mounting volumes in a Windows container either. I just know relaxing the permissions on my folder solved the issue for me.
I just chose
Issues go stale after 90d of inactivity.
Prevent issues from auto-closing with an
If this issue is safe to close now please do so.
Send feedback to Docker Community Slack channels #docker-for-mac or #docker-for-windows.
I don't know if it's the same issue but I had a similar problem with Docker for Windows 19.03.1 on Windows 10 1903. I could create/edit/delete files in a volume but I could not rename or move the file, it gave the error "DirectoryNotFound". The same operation was possible outside the volume.
I recreated the container and the issue was gone, I'm not sure how to reproduce