-
Notifications
You must be signed in to change notification settings - Fork 288
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cannot open read-only files in bind-mounted volume #6016
Comments
I was about to open the same issue. |
@djs55 Did we change something in this area between 2.2.0.3 and 2.2.0.4? |
I wonder if this is also related to the fact that windows mounted volumes are also now case-sensitive? #6013 |
@ricmzn thanks for the report and the very clear repro steps. I could reproduce this locally and identified the problem: unfortunately we mis-parse the Linux file open flags and attempt to open the file read/write instead of read-only. This was a regression caused by the fix to relax the file locking by adjusting the file open flags ( |
I deleted a comment about a prototype build because I just discovered it was incomplete - sorry for the confusion. |
I now have a more complete prototype build (based on top of the recent stable 2.2.0.4). If you have the time to try it let me know how it goes: https://download-stage.docker.com/win/stable/43542/Docker%20Desktop%20Installer.exe If it still doesn't work, please upload a fresh set of diagnostics and quote the id here. |
@djs55 Can also confirm this also fixes a lot of composer install issues people were having (though the file system wasn't RO in mycase). Thanks |
I had the same issue using git inside a VSCode remote container, and your prototype build fixes it. Thank you very much! |
I had in the recent stable 2.2.0.4 the following issue: @djs55 |
@djs55 I can also confirm that the linked prototype fixes the issue, with no visible regressions in the project I used for the initial diagnosis. Thanks a lot! |
And just another confirmation that this worked for an issue I had with VS Code and a Remote Container. |
I hit this, just with a git fetch/checkout inside the container. The build in #6016 (comment) fixed it for me @djs55 A good automated test to add while fixing this would probably be just the "git checkout in container" |
Yikes... |
@djs55 any projection about a release to fix this? More Windows folk stumble on it every day. The natives are getting restless :) |
@rfay the current plan is to release an Edge version at the end of the month (March) then a Stable based on it mid-April. |
Yay for releasing things on edge before stable! Thanks, looking forward to both. |
My issue is resolved with |
This is now fixed in 2.2.0.5 stable and 2.2.3.0 edge, so closing this ticket. |
Hi @stephen-turner , can you point to the commit, which fixes the problem. Got a similar problem, running docker-ee 19.03.8 on a MS Windows Server 2019 host (virtualized in VMWare ESXi) which serves as an Teamcity build agent. |
@bbqrob I can't point to the commit because the product is not open source. But in any case, your problem must be different, as you're running the EE Engine on Windows Server, and the bug was in the Docker Desktop code. I suggest you open a ticket in the moby/moby repository instead. |
Closed issues are locked after 30 days of inactivity. If you have found a problem that seems similar to this, please open a new issue. Send feedback to Docker Community Slack channels #docker-for-mac or #docker-for-windows. |
Expected behavior
Read-only files shared between the Windows host and a Docker container should still be readable from the container.
Actual behavior
Anything that tries to open the file gets a "File not found" or "Operation not permitted" error.
Information
This happened after a recent Docker Desktop update, although I can't remember which version was installed before (it was a few months old). I first noticed this when a project failed its test run because it was built in a Docker container, and one of the build tools tried to read files in the project's .git directory, some of which are made read-only by default.
Steps to reproduce the behavior
docker run -it -v "C:\Users\{yourname}\Desktop\{filename}:/test" ubuntu
ls -l
and try to read its contents withcat
:ls -l
andcat
after the change (note that ls can read the new permissions correctly):The text was updated successfully, but these errors were encountered: