chmod WSL (Bash) doesn't work

Deadly 提交于 2019-12-03 22:34:24

Amade's answer is correct, but please note, the cmd only take effect in session scope. If you exit current bash, you'll lose your setting.

To fix this, you need to edit /etc/wsl.conf. and put below config in.

[automount]
enabled = true
options = "metadata"

Ref:

Automatically Configuring WSL

Chmod/Chown WSL Improvements

There was an update to WSL recently (source), which lets you change permissions to files (Insider Build 17063).

All you have to do is to run:

sudo umount /mnt/c
sudo mount -t drvfs C: /mnt/c -o metadata
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!