Quantcast
Channel: Active questions tagged ubuntu - Stack Overflow
Viewing all articles
Browse latest Browse all 6025

Unable to create file or folder in Visual Studio Code

$
0
0

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.

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? I do not want to have to go and individually change folder permissions. I didn't have to do that before, and I should not have to do that now.


Viewing all articles
Browse latest Browse all 6025

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>