# File permission in Windows Subsystem for Linux

This post was originally from here. Windows Subsystem for Linux (WSL) usually mounts Windows drives under /mnt. However, the Linux file permission seems to be awful. To fix this issue, simply add to /etc/wsl.conf (if the file does not exist, simply create it):

[automount]
enabled = true


In short, every files now have permission 0644 and every directories have permission 0755.

Also, add the following to ~/.profile to fix the permission of newly created files and directories.

if [[ "\$(umask)" = "0000" ]]; then