I have installed WSL2 and Ubuntu. When I navigate to a folder in my Ubuntu terminal and type code, vs code comes up and opens my folder. When I try to create a file in vs code, I get the following error:
Unable to write file ‘vscode-remote://wsl+ubuntu-22.04/home/cryptosoaring/trading_bot/.env’ (NoPermissions (FileSystemError): Error: EACCES: permission denied, open ‘/home/cryptosoaring/trading_bot/.env’)
This is quite frustrating as before it was working fine. I have WSL2 and I also had Ubuntu working and opening my project folders and I could create folder and files no problem.
I accidentally deleted some files under my unix username and I had to uninstall Ubuntu and reinstall it.
Why doesn’t VS code see the problem ? Even when running VS Code as administrator, I still get the same error trying to create a file. How can I fix this permissions issue?