Workspace permission denied

I am running Ubuntu 12.04LTS. Have the unpacked Visual Studio code in the folder that belongs to my user ID. All vscode files belong to my user ID (user and group). Install node, npm, typescript installed with apt-get (and npm).

Visual Studio code works fine, however the File-> Preferences-> Workspace options give this error:

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

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

Thanks,

Bob Wirka

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

So, is there a way to tell Visual Studio Code that it should not try to use the root folder?

+4
source share
4 answers

I had the same problem on my OSX. I was able to solve this problem by changing the read and write permission in the project folder.

+2
source

Mentioned in the OP update, but I thought I would specify it explicitly. You need to change permissions for this folder. The following command will change the owner of the directory so that you can open it without requiring root privileges.

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

sudo chmod 777 -R <your_app_name_directory>.

This will give all permissions to all users, groups and other users to read, write, execute. -Rprovides recursive permissions for all folders of file attachments within your directory.

If -Rnot specified, it only grants permissions to the current directory, and not to other directories inside.

+1
source

Change folder permissions

sudo chmod ugo+rwx your_folder
0
source

Source: https://habr.com/ru/post/1617269/


All Articles