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
[BUG] MSYS2 fails to access Windows reparse points with IO_REPARSE_TAG_APPEXECLINK #1943
Comments
Read the error carefully. It says "Permission denied". Windows UWP realm is restricted from outer world unless the developer adds the permission in AppxManifest file, like Windows Terminal does. |
I think that mainly applies when the UWP app wants to access the system, not vise versa. Especially when cmd and pwsh can just access it. |
Added more details that show this is an MSYS bug. |
It seems this part should be fixed to support the new tag. https://github.com/msys2/Cygwin/blob/master/winsup/cygwin/path.cc#L2534-L2618 Edit: Okay, this is a cygwin bug. |
The Windows Store version of Python (and apparently other Windows Store applications) install a special reparse point called "app execution alias" into the user's `PATH`. These applications can be executed without any problem, but they cannot be read as if they were files. This trips up Cygwin's beautiful logic that tries to determine whether we're about to execute a Cygwin executable or not: instead of executing the application, it will fail, saying "Permission denied". Let's detect this situation (`NtOpenFile()` helpfully says that this operation is not supported on this reparse point type), and simply skip the logic: Windows Store apps are not Cygwin executables (and even if they were, it is unlikely that they would come with a compatible `cygwin1.dll` or `msys-2.0.dll`). This fixes msys2/MSYS2-packages#1943 Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
The Windows Store version of Python (and apparently other Windows Store applications) install a special reparse point called "app execution alias" into the user's `PATH`. These applications can be executed without any problem, but they cannot be read as if they were files. This trips up Cygwin's beautiful logic that tries to determine whether we're about to execute a Cygwin executable or not: instead of executing the application, it will fail, saying "Permission denied". Let's detect this situation (`NtOpenFile()` helpfully says that this operation is not supported on this reparse point type), and simply skip the logic: Windows Store apps are not Cygwin executables (and even if they were, it is unlikely that they would come with a compatible `cygwin1.dll` or `msys-2.0.dll`). This fixes msys2/MSYS2-packages#1943 Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
The Windows Store version of Python (and apparently other Windows Store applications) install a special reparse point called "app execution alias" into the user's `PATH`. These applications can be executed without any problem, but they cannot be read as if they were files. This trips up Cygwin's beautiful logic that tries to determine whether we're about to execute a Cygwin executable or not: instead of executing the application, it will fail, saying "Permission denied". Let's detect this situation (`NtOpenFile()` helpfully says that this operation is not supported on this reparse point type), and simply skip the logic: Windows Store apps are not Cygwin executables (and even if they were, it is unlikely that they would come with a compatible `cygwin1.dll` or `msys-2.0.dll`). This fixes msys2/MSYS2-packages#1943 Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
The Windows Store version of Python (and apparently other Windows Store applications) install a special reparse point called "app execution alias" into the user's `PATH`. These applications can be executed without any problem, but they cannot be read as if they were files. This trips up Cygwin's beautiful logic that tries to determine whether we're about to execute a Cygwin executable or not: instead of executing the application, it will fail, saying "Permission denied". Let's detect this situation (`NtOpenFile()` helpfully says that this operation is not supported on this reparse point type), and simply skip the logic: Windows Store apps are not Cygwin executables (and even if they were, it is unlikely that they would come with a compatible `cygwin1.dll` or `msys-2.0.dll`). This fixes msys2/MSYS2-packages#1943 Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
The Windows Store version of Python (and apparently other Windows Store applications) install a special reparse point called "app execution alias" into the user's `PATH`. These applications can be executed without any problem, but they cannot be read as if they were files. This trips up Cygwin's beautiful logic that tries to determine whether we're about to execute a Cygwin executable or not: instead of executing the application, it will fail, saying "Permission denied". Let's detect this situation (`NtOpenFile()` helpfully says that this operation is not supported on this reparse point type), and simply skip the logic: Windows Store apps are not Cygwin executables (and even if they were, it is unlikely that they would come with a compatible `cygwin1.dll` or `msys-2.0.dll`). This fixes msys2/MSYS2-packages#1943 Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Hi @dscho, I just saw your cygwin patch is released as 3.2.0 🚀! Does it mean this can be closed or is there a remaining work to be done? |
There remains work to be done: please verify that your scenario is fixed. |
Describe the bug
MSYS shell fails to run UWP apps with "Permission denied" error.
Steps to Reproduce the Problem
/c/Users/Kagami/AppData/Local/Microsoft/WindowsApps/python3.exe
from MSYS2Expected behavior: It should run Python 3
Additional Context: Operating System, Screenshots
If applicable, add screenshots to help explain your problem.
UWP apps creates reparse points for their executables in
/c/Users/Kagami/AppData/Local/Microsoft/WindowsApps/
, while MSYS fails to reparse them.See the PowerShell side of patch: PowerShell/PowerShell#10331
The text was updated successfully, but these errors were encountered: