问题

\wsl.localhost\Ubuntu路径中写操作时提示权限不足

原因

Windows访问Ubuntu目录时默认使用的是首次安装WSL Ubuntu时所创建的用户,如果在root权限的路径下做读写操作则会提示权限不足。

解决方案

设置WSL Ubuntu的默认用户为root

Ubuntu config --default-user root

关闭WSL

wsl --shutdown

启动WSL

wsl

启动后再尝试做写操作就能成功了。