This post was updated 578 days ago and some of the ideas may be out of date.
问题
在\wsl.localhost\Ubuntu
路径中写操作时提示权限不足

原因
Windows访问Ubuntu目录时默认使用的是首次安装WSL Ubuntu时所创建的用户,如果在root权限的路径下做读写操作则会提示权限不足。
解决方案
设置WSL Ubuntu的默认用户为root
Ubuntu config --default-user root
关闭WSL
wsl --shutdown
启动WSL
wsl
启动后再尝试做写操作就能成功了。
参与讨论