visual-studio-codewindows-subsystem-for-linux

I am unable make file or directory in Visual Studio Code in Win Subsystem for Linux


I use this guide. When I take the step "Add a source code file", I am shown this report:

Unable to write file 'vscode-remote://wsl+ubuntu-20.04/home/alex/TEST/helloworld/helloworld' (NoPermissions (FileSystemError): Error: EACCES: permission denied, open '/home/alex/TEST/helloworld/helloworld')

I don't know what to do, can some one help me?


Solution

  • The VScode needs permissions thus

    Try this command on your WSL terminal

    sudo chown -R username /path/to/working/directory
    

    Replace :

    'username' with your username and the path of your directory