Answer the question
In order to leave comments, you need to log in
File permissions in WSL2?
Hello!
Tell me how best to set up access rights in the following case: there is WSL2 with a configured environment for web development, sometimes files on WSL2 need access from Windows, for example, to edit hosts in Nginx. But you can’t just edit them from the explorer if WSL2 is not running as root. So far I have solved the problem like this: I run WSL2 as root, and I give the necessary project files permissions 777 (so that nginx can access them). I understand that this is not entirely correct, maybe there is a better way?
Answer the question
In order to leave comments, you need to log in
periodically, files on WSL2 need access from Windows, for example, to edit hosts in Nginxwhat was wrong with nano or vim for these purposes? On the edge, you can put on the Windows X server and run any Linux gui editor in wsl with the DISPLAY variable.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question