相关疑难解决方法(0)

WSL 挂载文件权限

在我测试 WSL 作为 git-for-windows bash 和准 unix 工作环境的可能替代品时,我在 WSL 中为我的/home/me/.ssh/目录设置了一个符号链接到相应的/mnt/c/users/me/.ssh/目录。不足为奇(因为ssh对目录/文件权限很严格),这不起作用:

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*
Run Code Online (Sandbox Code Playgroud)

我可能会在 linux 中创建文件,然后找到一种方法从 windows 链接到 linux 文件系统 ( %localappdata%/lxss/...),但他们强烈建议不要使用 windows 工具来编辑 linux 文件(参考:https : //blogs.msdn.microsoft.com/ commandline/2016/11/17/do-not-change-linux-files-using-windows-apps-and-tools/),所以每当我需要调整某些东西时,我必须跳入 WSL。(如果不出意外,这可能是首选的折衷方案,但是......)

我总是可以维护两个不同的目录(每个目录都属于自己的系统),但我更愿意共享它们。然而,更大的图景是如何修改 Windows 安全权限以模仿足够的 linux 文件系统属性,以便 WSL 看到我们最终所需的权限。

当前对WIN/.../.ssh/config文件的权限为:SYSTEM、me …

file-permissions windows-subsystem-for-linux

14
推荐指数
1
解决办法
2万
查看次数