Skip to content

File permissions changed after copying it to WSL2 #8141

Answered by FR13ndSDP
FR13ndSDP asked this question in Q&A
Discussion options

You must be logged in to vote

By default, the file system mounted to WSL has permission 777, so file copied from windows to WSL is excutable. Change the options in \etc\wsl.conf would help:

[automount]
enabled = true
root = /mnt/
options = "metadata,fmask=133,dmask=022"

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@FR13ndSDP
Comment options

Answer selected by FR13ndSDP
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant