-
Notifications
You must be signed in to change notification settings - Fork 835
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
drvfs fmask=111 breaks (e.g.) cmd.exe without workarounds? #3267
Comments
"Surprised" it doesn't work UAC elevated, even though changing the Unix mode of stuff in Work around if you are hellbent on a Someone from the team will have to weigh in on why you can't |
There's lots of weird ACL rules on C:\Windows stuff, e.g.:
I'm sure I could stomp permissions on these to get the chmod applied (somehow - |
Yep. I deleted a bit of my last post before submission because I didn't want to get lost in the DACL weeds. These days you can't even rename/replace (say) I'll hold this open for a bit on the chance someone else jumps in with something more to add. But this feels like a wrap. |
Not sure what you mean - yes, each part is behaving as designed, which when combined makes them not work in a useful way - this is what an issue is 😉. Clearly there are plenty of options that don't involve users modifying system files, my original post suggests two others, and here's another two:
I opened this issue so WSL could try to have a solution that actually does the right thing by default here, which it's gotten a lot better at over time. Custom mounts are a pretty bad solution, but at least they are one. The problem is that you have to mount "stuff I might want to actually edit with WSL" in the custom fstab entry, because the other way around makes the 16 entries (or whatever) you have in %PATH% all broken. But you still have the automount that if you accidentally use, will display every non-chmodded file as 777, meaning it's all to easy to git commit every file as changed to +x. And it's way to easy to do that, as using |
I mean this issue# is a hair from closed-bydesign. None of your proposals (along with the per-directory case sensitivity, but I digress) have a POSIX/Linux syscall API nor companion tooling. At base, multiple mounts is a "bad solution" (for the sake of argument only) because there is no "win" down this path in the first instance. The right place to submit a new WSL syscall API for any one of your proposals would be in UserVoice. To be clear: I am not even discouraging you from doing that. Stranger things (again, per-directory case sensitivity) have happened. Who knows. |
Huh? Again, this is a very confusing response. This change would presumably be under either DrvFS or WSL -> win32 interop, both of which are pretty clearly in scope and have had multiple non-syscall related changes over the last year? And I have no idea where the line on "companion tooling" is. Does wsl.conf count? Presumably fsutil.exe does, what if this is an option to that? I am incredibly confused by the claim that "there is no win down this path" especially - what does that even mean? The request is roughly "please make it so things can work how they obviously (for a user) should be working" (i.e. posix in general expects no +x by default, wsl should be able to run exe's) - that's a "win", but it doesn't seem like what you meant by that sentence? I get the feeling these replies are coming from through Raymond Chen's infamous kernel-colored glasses, because right now, from a users point of view they're simply bizarre. To be clear, I explicitly didn't say what solution I want because I have no idea what he right fix here would be, or if anything I suggested would work. If instead of a WSL change the answer is "this sucks, but it can't be changed without making things worse", ok, I have to believe the people that work on this. If it's "you don't want to do X, you want to do Y", then I'll see if that works, and if so great, if not then we can go from there. But right now you've suggested Y, and I've said why that is much worse than WSL making some change to fix this, and you've replied with "then that's a feature request". This is a strange reply to me, because fmask=111 seems like it's the 90% case for using the DrvFS options at all, (hence it being the first example in the blog!), so it breaking the 90% case for WSL at all definitely feels like it falls on the bug side. I'm sorry for so much text. |
... no actual reply to any of my points or questions? Are you being deliberately passive aggressive? |
Companion tooling are applications like
If you are proposing a win32 side solution to your ask, sure. Sounds good to me.
If you believe it is a win, great. It was not my intent to come across as passive aggressive; apologies if it did. Once you have a concrete proposal to improve WSL it is very welcome in UserVoice. |
Closing without a comment as a reply is generally pretty hard to take otherwise.
Ah, this is normally called "user space" (as opposed to kernel), or in the case of WSL, effectively just the distro.
This doesn't seem to follow the conversation at all? It's a reply to a reply to:
So the point isn't what I believe, so again, if intended this just reads as very passive aggressive!? The problem with a uservoice proposal is that I don't know what the right answer here is. The reason I mentioned several options was to point out I don't much care what the feature / change actually is, so long as windows editors, chmod and git work together "properly". When I'm on a keyboard again I'll see if I can figure out something appropriate though. |
Tell you what; I will mark this as discussion for the time being and let it play out. I will not be participating further. Having rejected (or misunderstood) my intent, I have nothing further to offer you on this topic. Bonne chance. |
Ran course. The right place to submit a new WSL API or a new win32 API for any one of your proposals would be in UserVoice. |
Fair enough: I forgot to get back around to posting this, there. |
Sorry replying to an old issue, but maybe this workaround can help someone else (at least works for me):
|
Neat trick! I wonder if there's a possible problem with the exe's running with NFS semantics, but it's probably not a problem with the system .exe's you would be using, and of course you could flip to |
You probably also want these entries for other common $PATH locations, the
|
Post from the devs not five days ago:
You can mount bind mount them as mentioned. [Setting aside that the OP was about |
"bind mount" AFAIK doesn't change fmask, so it's out of topic. Also the devs said:
In this workaround example, symlinks and case sensitivity are probably irrelevant (I don't know if |
Ehh, not really, I was saying that the natural solution would be to |
You have to bind a different mount with alternative permissions. Which is what was stated in the first reply to this issue submission in June of 2018. None of which are work-arounds. [edit[ ^--- Reflected on that a bit after trying Simon's setup. That probably wouldn't work as described, and thus my saying it would be "standard operating procedure" is incorrect (and deserves correction). You'd need bindfs, I think (and that is a whole other kettle of fish). Bindfs was brought up in passing ref #1240 here.
That would fail on Real Linux too. Naturally. Because In any case, I only dropped by to ensure Sven's post was not lost, and to set up a landing zone for the eventuality that someone puts |
Am I missing something?
This is on build 18356 |
I'd guess even an immediate fix would have an approximately negative chance to get into 19H1 anyway, so no hurry. |
Do-over of my deleted post (I removed it because I figured it was worth pursuing tonight).
Tried your setup on a lark. Your fmask=222 on /mnt-ro/c isn't taking, which appears to be incorrect behavior (from here, anyway). This has not been reported before -- probably for lack of a reason to do any of this, and therefore lack of anyone who has tried it and complained. I've opened #3963. If an alternate fmask takes with DrvFS over SMB but not DrvFS over NTFS, then Sven's "strongly not recommended" advice backs people into a blind alley. A more straightforward repro looks something like: This all said, we are probably going to get an |
ver
at a Windows Command Prompt)Microsoft Windows [Version 10.0.17134.81]
Not sure if I'm just missing something here? When using fmask=111 as used as an example in the post introducing the feature using windows .exes doesn't work - OK, that's as expected. The problem is that there doesn't seem to be a way to chmod +x things in
/mnt/c/Windows
- even UAC elevated +sudo
doesn't help:Removing +x permission from drvfs files by default is a really big win, because git preserves the +x permission on filemode-supporting filesystems, and otherwise can only be set via
git add --chmod=+x
orgit update-index --chmod=+x
(from memory).Not really sure what the right answer here would be: pre-chmod'ing windows executables? Path/glob-based *mask configuration? Permitting chmod of system files somehow?
The text was updated successfully, but these errors were encountered: