-
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
Host folder mount: inconsistent permissions behavior (permissions spontaneously change during session) #14338
Comments
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:
Observations:
|
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
Client: Version: 27.2.0 API version: 1.47 Go version: go1.21.13 Git commit: 3ab4256 Built: Tue Aug 27 14:17:17 2024 OS/Arch: windows/amd64 Context: desktop-linux Server: Docker Desktop 4.34.2 (167172) Engine: Version: 27.2.0 API version: 1.47 (minimum version 1.24) Go version: go1.21.13 Git commit: 3ab5c7d Built: Tue Aug 27 14:15:15 2024 OS/Arch: linux/amd64 Experimental: false containerd: Version: 1.7.20 GitCommit: 8fc6bcff51318944179630522a095cc9dbf9f353 runc: Version: 1.1.13 GitCommit: v1.1.13-0-g58aa920 docker-init: Version: 0.19.0 GitCommit: de40ad0
docker info
Diagnostics ID
52FB3D9B-25A6-442E-A07D-0B5E6D120234/20240929033802
Additional Info
No response
The text was updated successfully, but these errors were encountered: