WSL: drvfs fmask=111 breaks (e.g.) cmd.exe without workarounds?
- Your Windows build number: (Type
verat a Windows Command Prompt)
Microsoft Windows [Version 10.0.17134.81]
- What you’re doing and what’s happening: (Copy&paste specific commands and their output, or include screen shots)
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:
% sudo chmod +x /mnt/c/Windows/System32/cmd.exe
[sudo] password for simon:
chmod: changing permissions of '/mnt/c/Windows/System32/cmd.exe': Permission denied
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 or git update-index --chmod=+x (from memory).
- What’s wrong / what should be happening instead:
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?
About this issue
- Original URL
- State: closed
- Created 8 years ago
- Reactions: 3
- Comments: 22
Sorry replying to an old issue, but maybe this workaround can help someone else (at least works for me):
/etc/wsl.conf/etc/fstabTell 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.
Companion tooling are applications like
ls,stat,chown,chmod,mount, and other *nix tools.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.