Workspace Settings permission denied

12,206

Solution 1

Mentioned in the update by the OP but thought I'll mention it explicitly. You need to change the permissions for the folder. The following command will change the owner of the directory so that you can open it without needing root privileges.

$ sudo chown <user-name> -R <directory-name>

Solution 2

I had same issue on my osx. I was able to solve this issue by change the permission to read and write in project folder.

Solution 3

Simply type sudo chmod 777 -R <your_app_name_directory>.

This will give all permissions to all users, groups and others for read, write, execute. -R gives recursively permissions to all nested files folders inside your directory.

If -R is not given then it gives permissions to current directory only, not to other directories inside.

Share:
12,206

Related videos on Youtube

bobwirka
Author by

bobwirka

I design network enabled embedded devices for building and machine control. Hardware and software.

Updated on September 15, 2022

Comments

  • bobwirka
    bobwirka over 1 year

    I'm running Ubuntu 12.04LTS. Have unpacked Visual Studio Code in a folder owned by my user id. All vscode files are owned by my user id (user and group). Have Node.js, npm, typescript installed via apt-get (and npm).

    Visual Studio code runs fine, however File->Preferences->Workspace Settings gives this error:

    Unable to create 'vscode/settings.json' (Error: EACCES: permission denied, mkdir '/.vscode').

    Any ideas on how to resolve this? Where is it trying to do the mkdir?

    Thanks,

    Bob Wirka

    UPDATE: Sudo'd mkdir "/.vscode" (literally at the root level), and chown'd it recursively to my user and group. Voila! Now I can edit the settings.

    So, is there a way to tell Visual Studio Code that it shouldn't be trying to use the root folder?