-1

WSL can't run any exe files after I added options = "metadata,umask=022,fmask=111" to wsl config. The reason I did this is so I can share ssh keys from a parent windows machine. So I would like to keep that behavior.

This is what I get:

/usr/bin/wslview: line 216: /mnt/c/Windows/System32/reg.exe: Permission denied
/usr/bin/wslview: line 149: /mnt/c/Windows/System32/chcp.com: Permission denied
/usr/bin/wslview: line 156: /mnt/c/Windows/System32/WindowsPowerShell/v1.0/powershell.exe: Permission denied
/usr/bin/wslview: line 149: /mnt/c/Windows/System32/chcp.com: Permission denied

I can chmod some exe files +x to and make them run but some I can't. I'm currently trying to open file with chrome, but I would like a general solution so I can run all exe files.

1 Answer 1

1

The +x bit is being removed because you specified a fmask that removes the +x bit.

Both 'fmask' and 'dmask' specify which permission bits to remove (starting with a "full" set), so your fmask=0111 literally means it masks out --x--x--x while keeping everything else intact. (For example, 0777 & ~fmask = 0666, i.e. rwxrwxrwx & ~fmask = rw-rw-rw-.)

To avoid that, remove the +x bit from your fmask. Since currently that's the only bit it has, the result should be fmask=0.

Octal  Binary  Textual
-----  ------  -------
  4     100     r--
  2     010     -w-
  1     001     --x

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .