Warm tip: This article is reproduced from stackoverflow.com, please click
linux ubuntu visual-studio-code

vscode always ask for permission to save

发布于 2021-01-17 09:01:22

I'm new to Ubuntu and here is my issue:
VSCode is always asking for permission to save any edit on any file.

I just want to edit and save without having to enter my password every time so is this possible on Ubuntu?
I tried to add a new user, but I see also the same problem.
I tried to run VSCode as root, but it said it's dangerous to run it as root.

How can I avoid this permission step when saving a file with VSCode?

Questioner
Omar Abdelhady
Viewed
11
75 2020-11-13 20:11

Make sure that you (as an Ubuntu user account) are the owner of the folder and files you are editing in VSCode:

cd /path/to/my/files
chown -R $USER:$USER .

Note: If you are not the user, you might have to precede that with sudo:

sudo chown -R $USER:$USER