Required to enter password every time I want to save a file in VSCode
![Creative The name of the picture](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgO9GURib1T8z7lCwjOGLQaGtrueEthgQ8LO42ZX8cOfTqDK4jvDDpKkLFwf2J49kYCMNW7d4ABih_XCb_2UXdq5fPJDkoyg7-8g_YfRUot-XnaXkNYycsNp7lA5_TW9td0FFpLQ2APzKcZ/s1600/1.jpg)
![Creative The name of the picture](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhYQ0N5W1qAOxLP7t7iOM6O6AzbZnkXUy16s7P_CWfOb5UbTQY_aDsc727chyphenhyphen5W4IppVNernMMQeaUFTB_rFzAd95_CDt-tnwN-nBx6JyUp2duGjPaL5-VgNO41AVsA_vu30EJcipdDG409/s400/Clash+Royale+CLAN+TAG%2523URR8PPP.png)
up vote
0
down vote
favorite
As I read around from a few threads here. I shouldn't run VSCode as root because it is dangerous. But every time I hit CTRL+S, I need to go down to the bottom right and click run as administrator and enter my password. Not just once, but every time I save a file. Even the same file that I already just saved 2 seconds ago.
I'm saving the files in a folder on my desktop: ~/Desktop/github
.
Why does this happen and how can I avoid it?
permissions visual-studio-code
add a comment |Â
up vote
0
down vote
favorite
As I read around from a few threads here. I shouldn't run VSCode as root because it is dangerous. But every time I hit CTRL+S, I need to go down to the bottom right and click run as administrator and enter my password. Not just once, but every time I save a file. Even the same file that I already just saved 2 seconds ago.
I'm saving the files in a folder on my desktop: ~/Desktop/github
.
Why does this happen and how can I avoid it?
permissions visual-studio-code
Where do you attempt to save the files?
â vidarlo
May 26 at 13:47
Just a folder on the desktop thomas@thomas-desktop:~/Desktop/github
â Thomas Charlesworth
May 26 at 13:49
add a comment |Â
up vote
0
down vote
favorite
up vote
0
down vote
favorite
As I read around from a few threads here. I shouldn't run VSCode as root because it is dangerous. But every time I hit CTRL+S, I need to go down to the bottom right and click run as administrator and enter my password. Not just once, but every time I save a file. Even the same file that I already just saved 2 seconds ago.
I'm saving the files in a folder on my desktop: ~/Desktop/github
.
Why does this happen and how can I avoid it?
permissions visual-studio-code
As I read around from a few threads here. I shouldn't run VSCode as root because it is dangerous. But every time I hit CTRL+S, I need to go down to the bottom right and click run as administrator and enter my password. Not just once, but every time I save a file. Even the same file that I already just saved 2 seconds ago.
I'm saving the files in a folder on my desktop: ~/Desktop/github
.
Why does this happen and how can I avoid it?
permissions visual-studio-code
edited May 26 at 15:01
![](https://i.stack.imgur.com/8CW8e.png?s=32&g=1)
![](https://i.stack.imgur.com/8CW8e.png?s=32&g=1)
Zanna
47.8k13116226
47.8k13116226
asked May 26 at 13:42
Thomas Charlesworth
101
101
Where do you attempt to save the files?
â vidarlo
May 26 at 13:47
Just a folder on the desktop thomas@thomas-desktop:~/Desktop/github
â Thomas Charlesworth
May 26 at 13:49
add a comment |Â
Where do you attempt to save the files?
â vidarlo
May 26 at 13:47
Just a folder on the desktop thomas@thomas-desktop:~/Desktop/github
â Thomas Charlesworth
May 26 at 13:49
Where do you attempt to save the files?
â vidarlo
May 26 at 13:47
Where do you attempt to save the files?
â vidarlo
May 26 at 13:47
Just a folder on the desktop thomas@thomas-desktop:~/Desktop/github
â Thomas Charlesworth
May 26 at 13:49
Just a folder on the desktop thomas@thomas-desktop:~/Desktop/github
â Thomas Charlesworth
May 26 at 13:49
add a comment |Â
2 Answers
2
active
oldest
votes
up vote
0
down vote
You do not own the directory "github"
Open a terminal
cd Desktop
chown $USER:$USER github
... and you can save files in that directory. But do have a think about it 1st: who or what created it? Maybe you are not supposed to use that directory? Is it called github for a specific reason? I would assume VSCode would use "Documents".
add a comment |Â
up vote
0
down vote
check ownership and permissions for that file.
ls -l
it will give you list of file, permision and ownership. Here is a example,
file list screen shot. If your user don't have ownership you can change it using
sudo chown -R $USER:$USER *folder_name*
or if you are in user group (like www-data) and your user group own files but you can't do changes, you have to change permission level to 775, by doing this.
sudo chmod +775 *file_name*
add a comment |Â
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
0
down vote
You do not own the directory "github"
Open a terminal
cd Desktop
chown $USER:$USER github
... and you can save files in that directory. But do have a think about it 1st: who or what created it? Maybe you are not supposed to use that directory? Is it called github for a specific reason? I would assume VSCode would use "Documents".
add a comment |Â
up vote
0
down vote
You do not own the directory "github"
Open a terminal
cd Desktop
chown $USER:$USER github
... and you can save files in that directory. But do have a think about it 1st: who or what created it? Maybe you are not supposed to use that directory? Is it called github for a specific reason? I would assume VSCode would use "Documents".
add a comment |Â
up vote
0
down vote
up vote
0
down vote
You do not own the directory "github"
Open a terminal
cd Desktop
chown $USER:$USER github
... and you can save files in that directory. But do have a think about it 1st: who or what created it? Maybe you are not supposed to use that directory? Is it called github for a specific reason? I would assume VSCode would use "Documents".
You do not own the directory "github"
Open a terminal
cd Desktop
chown $USER:$USER github
... and you can save files in that directory. But do have a think about it 1st: who or what created it? Maybe you are not supposed to use that directory? Is it called github for a specific reason? I would assume VSCode would use "Documents".
answered May 26 at 15:37
Rinzwind
195k25374506
195k25374506
add a comment |Â
add a comment |Â
up vote
0
down vote
check ownership and permissions for that file.
ls -l
it will give you list of file, permision and ownership. Here is a example,
file list screen shot. If your user don't have ownership you can change it using
sudo chown -R $USER:$USER *folder_name*
or if you are in user group (like www-data) and your user group own files but you can't do changes, you have to change permission level to 775, by doing this.
sudo chmod +775 *file_name*
add a comment |Â
up vote
0
down vote
check ownership and permissions for that file.
ls -l
it will give you list of file, permision and ownership. Here is a example,
file list screen shot. If your user don't have ownership you can change it using
sudo chown -R $USER:$USER *folder_name*
or if you are in user group (like www-data) and your user group own files but you can't do changes, you have to change permission level to 775, by doing this.
sudo chmod +775 *file_name*
add a comment |Â
up vote
0
down vote
up vote
0
down vote
check ownership and permissions for that file.
ls -l
it will give you list of file, permision and ownership. Here is a example,
file list screen shot. If your user don't have ownership you can change it using
sudo chown -R $USER:$USER *folder_name*
or if you are in user group (like www-data) and your user group own files but you can't do changes, you have to change permission level to 775, by doing this.
sudo chmod +775 *file_name*
check ownership and permissions for that file.
ls -l
it will give you list of file, permision and ownership. Here is a example,
file list screen shot. If your user don't have ownership you can change it using
sudo chown -R $USER:$USER *folder_name*
or if you are in user group (like www-data) and your user group own files but you can't do changes, you have to change permission level to 775, by doing this.
sudo chmod +775 *file_name*
answered Aug 20 at 18:23
![](https://lh6.googleusercontent.com/-yeycDJ1NuUc/AAAAAAAAAAI/AAAAAAAAARk/UjNb9mDawL0/photo.jpg?sz=32)
![](https://lh6.googleusercontent.com/-yeycDJ1NuUc/AAAAAAAAAAI/AAAAAAAAARk/UjNb9mDawL0/photo.jpg?sz=32)
Emalsha Rasad
513
513
add a comment |Â
add a comment |Â
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
var $window = $(window),
onScroll = function(e)
var $elem = $('.new-login-left'),
docViewTop = $window.scrollTop(),
docViewBottom = docViewTop + $window.height(),
elemTop = $elem.offset().top,
elemBottom = elemTop + $elem.height();
if ((docViewTop elemBottom))
StackExchange.using('gps', function() StackExchange.gps.track('embedded_signup_form.view', location: 'question_page' ); );
$window.unbind('scroll', onScroll);
;
$window.on('scroll', onScroll);
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1040601%2frequired-to-enter-password-every-time-i-want-to-save-a-file-in-vscode%23new-answer', 'question_page');
);
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
var $window = $(window),
onScroll = function(e)
var $elem = $('.new-login-left'),
docViewTop = $window.scrollTop(),
docViewBottom = docViewTop + $window.height(),
elemTop = $elem.offset().top,
elemBottom = elemTop + $elem.height();
if ((docViewTop elemBottom))
StackExchange.using('gps', function() StackExchange.gps.track('embedded_signup_form.view', location: 'question_page' ); );
$window.unbind('scroll', onScroll);
;
$window.on('scroll', onScroll);
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
var $window = $(window),
onScroll = function(e)
var $elem = $('.new-login-left'),
docViewTop = $window.scrollTop(),
docViewBottom = docViewTop + $window.height(),
elemTop = $elem.offset().top,
elemBottom = elemTop + $elem.height();
if ((docViewTop elemBottom))
StackExchange.using('gps', function() StackExchange.gps.track('embedded_signup_form.view', location: 'question_page' ); );
$window.unbind('scroll', onScroll);
;
$window.on('scroll', onScroll);
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
var $window = $(window),
onScroll = function(e)
var $elem = $('.new-login-left'),
docViewTop = $window.scrollTop(),
docViewBottom = docViewTop + $window.height(),
elemTop = $elem.offset().top,
elemBottom = elemTop + $elem.height();
if ((docViewTop elemBottom))
StackExchange.using('gps', function() StackExchange.gps.track('embedded_signup_form.view', location: 'question_page' ); );
$window.unbind('scroll', onScroll);
;
$window.on('scroll', onScroll);
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Where do you attempt to save the files?
â vidarlo
May 26 at 13:47
Just a folder on the desktop thomas@thomas-desktop:~/Desktop/github
â Thomas Charlesworth
May 26 at 13:49