Last updated 3 years ago
Was this helpful?
chmod 命令对(windows 文件系统中的)文件不起作用
解决:在 /etc/wsl.conf (如果没有则创建)中增加如下内容:
/etc/wsl.conf
[automount] options = "metadata"
然后在 PowerShell 中执行 wsl --shutdown ,重新打开 wsl 命令行时 chmod 即生效
wsl --shutdown
ref: https://stackoverflow.com/questions/46610256/chmod-wsl-bash-doesnt-work