-
Notifications
You must be signed in to change notification settings - Fork 822
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
WSL2: NTFS symlinks in $PATH cause EPERM and breaks execvp() #4357
Comments
I dug into glibc (on my system, glibc 2.27). If I understand things correctly, the following: The manpage says:
This documentation aligns with the glibc code handling EACCES. However, in this scenario, we get EPERM, not EACCES, from the resulting Fun! ;) |
Yep. Good post, your analysis is spot on. #4104 #4255 with a side order of #3886. I swear there is an older issue that describes the There are actually two problems with WSL here. (1) WSL imports paths it doesn't have access to, and (2) that |
After I login into my fish shell I got
I think it might be a problem relates to this. |
This issue has been automatically closed since it has not had any activity for the past year. If you're still experiencing this issue please re-file this as a new issue or feature request. Thank you! |
Please fill out the below information:
Your Windows build number: 19.03 build 18945.1001
What you're doing and what's happening: Type a command which is not in the linux $PATH, and path searching fails "operation not permitted". Example:
All of these errors, 32 are ENOENT and 1 is EPERM.
The EPERM error comes from:
Inspecting this path:
Back on Windows, Powershell, we see this
javapath
is an NTFS symlink:Workaround: For any affected program, using
which
to lookup the path works for me. For example, in GNU Make:But in my shell, it's fine:
Workaround, use
which
when we know an executable exists but execvp() is otherwise failing.make
fails in a special way because of the way it executes usingexecvp
which aborts early upon the first non-ENOENT error:The text was updated successfully, but these errors were encountered: