In my testing of WSL as a possible replacement for the git-for-windows bash and quasi-unix work environment, I have set up a symlink within WSL for my
/home/me/.ssh/ directory to the corresponding
/mnt/c/users/me/.ssh/ direcory. Not too surprisingly (since
ssh is strict on dir/file permissions), this does not work:
me@d2book:~$ ssh myth Bad owner or permissions on /home/me/.ssh/config me@d2book:~$ ll -d .ssh .ssh/config lrwxrwxrwx 1 me me 20 Oct 16 13:12 .ssh -> /mnt/c/Users/me/.ssh/ -rwxrwxrwx 1 root root 6335 Dec 5 07:47 .ssh/config*
I might create the files in linux and then find a way to link from windows into the linux filesystem (
%localappdata%/lxss/...), but they recommend strongly against using windows tools to edit linux files (ref: https://blogs.msdn.microsoft.com/commandline/2016/11/17/do-not-change-linux-files-using-windows-apps-and-tools/), so whenever I need to tweak something, I must jump into WSL. (If nothing else, this might be the preferred compromise, but ...)
I can always maintain two distinct directories (each local to own system), but I'd prefer to share them. Bigger picture, though, is how to modify the windows security permissions in order to mimic enough linux filesystem properties such that WSL sees our end-desired permissions.
The current permissions on the
WIN/.../.ssh/config files are: SYSTEM, me, and Administrators all have full-control. When I want to change SYSTEM, it warns me about inheriting permissions and such. I know that windows dir/file permissions are different in many ways, but ultimate ...
Q: is there an easy security posture for windows files/dirs such that WSL sees them as user-only (owner) access? (analogous to a umask of
0077). More generically, is there a a recipe for mapping at least some similarity between the
ugo unix-y assignments and Windows file security?