Open metal450 opened 3 days ago
Ok...after many hours, I finally just figured it out. Edit: Nevermind, not resolved- see follow-up below
NTFS permissions. Evidently giving "Full Access" to "Everyone" is not sufficient - you have to explicitly give "Full Access" to "SYSTEM" as well.
....Nevermind, I take it back. It seemed to start working when I applied those ntfs permissions, & it worked for about 15 minutes, but then spontaneously stopped working again. So the broken/inconsistent behavior remains.
Ok, more clarity:
docker-compose down
)docker-compose up -d mysql
Observations:
ls -l
showed no permissions, then ls -l
immediately after showed rwx
. It looks like just "reading from the files" after the container is started makes them accessible, as if reading from them once causes Docker to properly "evaluate" the permissions. However, it's weird that I have to manually do this - why does my manually reading the files "fix" the permissions but the webhost process itself accessing them does not?
Description
Using Docker Desktop with WSL2, I'm mounting a host folder via a relative path. However, the file permissions in that shared folder (as viewed by the container) seem extremely unpredictable/buggy - to the point where the permissions literally seem to change from one moment to the next. Full repro steps are below, but as a quick example, here's a screenshot where I used Docker Desktop's "exec" tab to navigate to the shared folder, and did
ls -la
twice in a row (with no actions taken in between). You can see that the first time the files have permissions-----
, and the second time they haverwxrwxrwx
. I literally just didls -la
twice back-to-back:Reproduce
HTTPD_SERVER=apache-2.4
,HOST_PORT_MYSQL=33060
,HOST_PORT_BIND=45013
/shared/httpd
. Create adocker-compose.override.yml
file containing:docker-compose up -d mysql
127.0.0.1 dev.loc
cd /shared/httpd/dev/htdocs
.ls -la
. It shows all the files with permissions----
, as in the screenshot above.ls -la
again. Now it suddenly showsrwxrwxrwx
Additional notes:
ls -la
. I'll refresh the browser. Then it will successfully load scripts in the folder that I listed - but if they include/require any scripts in other folders, which I haven't "looked at" from Docker desktop, it will fail to include those due to access denied errors.So to summarize, only Docker Desktop/wsl is behaving strangely - the same containers, config, & data works properly with both Docker Engine on Linux and Docker Toolbox.
Why does Docker Desktop it show
---
one minute, thenrwx
the next, and why does simply listing the files from within Docker Desktop change the behavior of the server?Expected behavior
It should be able to access the host folder properly, as it can in both Docker Engine and Docker Toolbox
docker version
docker info
Diagnostics ID
52FB3D9B-25A6-442E-A07D-0B5E6D120234/20240929033802
Additional Info
No response