-
Notifications
You must be signed in to change notification settings - Fork 121
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
linux access command giving the wrong answer for X_OK for a non-executable file in a shared volume #5029
Comments
This can also be easily reproduced with the
Interestingly enough,
|
The issue seems to affect access() and faccessat(), but not stat(). /bin/sh on alpine and /bin/ash both use stat(), while bash uses faccessat(). So (with Docker Desktop 2.5.0 on MacOS 10.15):
|
I've found that this also seems to affect Docker Desktop 2.4.0 as well; 2.3.0.5 functions as expected. |
@djs55 PTAL |
Issues go stale after 90 days 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. |
/remove-lifecycle stale |
/lifecycle frozen |
I've found that this can be worked around by disabling gRPC FUSE. Is there some way to detect from the command-line whether gRPC FUSE is enabled or not? Failing that, is it possible to detect over the API? |
Not exactly from the command line, but you can find it in the settings.json file. |
so.. is there any solution to this? The legacy sharing (when you disable gRPC FUSE) has 1 second file timestamps resolution. which breaks my build process. and gRPC has broken 'test -x' in bash. which also breaks build process ;) any ideas? |
Is this a Docker issue or FUSE issue? Is there some way we can at least identify where a fix might exist? This comes into play when doing VSCode Remote Container development for build/make processes that check for executable permissions. |
The new "Enable VirtioFS accelerated directory sharing" feature seems to have the same issue; I assume it forces gRPC FUSE back on. |
any news on this? |
I am not sure why is issue not getting any attention. |
It seems that both gRPC FUSE and VirtioFS in the very latest version (4.16.2) still suffer from this bug. Worse, it seems that the legacy osxfs driver is now hanging on access to bind-mounted volumes (at least on MacOS 12.6.3 ARM), breaking the workaround of using it instead, completely breaking my use case for Docker Desktop. |
got the same issue here |
Still the same with Docker Desktop 4.19.0. |
And still the same for Docker Desktop 4.21.1 |
Not sure why is this not getting the deserving love. |
February of 2024 and I have the same issue. |
I have the same error as of April 2024. |
I have the same issue. |
This seems to effect the stock official |
For what its worth, several of my colleagues and I switched to OrbStack instead of Docker Desktop and it does not have this problem. If it is a viable option for you, do consider giving it a try. |
I came here while analysing check-executables-have-shebangs pre-commit check failing, in a VS Code Dev Container. I tried using the new Docker VMM (beta) today and the pre-commit check is no longer failing. Just thought to leave a note. |
This may be the same as issue #5007
I can't quite tell. I expected False and in that ticket the user expected "access denied".
Expected behavior
The linux command access(path, F_OK) should return False for a file that is not executable.
Actual behavior
When the file is in a shared volume the access command above returns True for a file that is not executable. This despite
ls -l
showing that the file is not executable.Steps to reproduce the behavior
On macOS (I have 10.14.6): create a directory containing at least one file that is not executable.
Run a Docker image that runs CentOS Linux release 7.7.1908 (Core), mounting that directory into the image.
It simplifies the test if the Docker image includes Python (I have 3.7.8 but it should not matter), but it suffices to have gcc.
Run the following code inside the image:
I see True if the file is not executable and is on my shared volume, which is incorrect.
I see the correct result of False if the file is not executable and is internal to the Docker image.
If you would rather not use Python then compile and run the following C++ code.
I get the same results with it as I do with the Python test above.
Output of
docker version
:Output of
docker info
:Additional environment details (AWS, VirtualBox, physical, etc.)
macOS 10.14.6
And in the Docker image:
The text was updated successfully, but these errors were encountered: