Required to enter password every time I want to save a file in VSCode

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP








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?







share|improve this question






















  • 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














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?







share|improve this question






















  • 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












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?







share|improve this question














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?









share|improve this question













share|improve this question




share|improve this question








edited May 26 at 15:01









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
















  • 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










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".






share|improve this answer



























    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*





    share|improve this answer




















      Your Answer







      StackExchange.ready(function()
      var channelOptions =
      tags: "".split(" "),
      id: "89"
      ;
      initTagRenderer("".split(" "), "".split(" "), channelOptions);

      StackExchange.using("externalEditor", function()
      // Have to fire editor after snippets, if snippets enabled
      if (StackExchange.settings.snippets.snippetsEnabled)
      StackExchange.using("snippets", function()
      createEditor();
      );

      else
      createEditor();

      );

      function createEditor()
      StackExchange.prepareEditor(
      heartbeatType: 'answer',
      convertImagesToLinks: true,
      noModals: false,
      showLowRepImageUploadWarning: true,
      reputationToPostImages: 10,
      bindNavPrevention: true,
      postfix: "",
      onDemand: true,
      discardSelector: ".discard-answer"
      ,immediatelyShowMarkdownHelp:true
      );



      );








       

      draft saved


      draft discarded


















      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






























      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".






      share|improve this answer
























        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".






        share|improve this answer






















          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".






          share|improve this answer












          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".







          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered May 26 at 15:37









          Rinzwind

          195k25374506




          195k25374506






















              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*





              share|improve this answer
























                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*





                share|improve this answer






















                  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*





                  share|improve this answer












                  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*






                  share|improve this answer












                  share|improve this answer



                  share|improve this answer










                  answered Aug 20 at 18:23









                  Emalsha Rasad

                  513




                  513






















                       

                      draft saved


                      draft discarded


























                       


                      draft saved


                      draft discarded














                      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













































































                      Popular posts from this blog

                      pylint3 and pip3 broken

                      Missing snmpget and snmpwalk

                      How to enroll fingerprints to Ubuntu 17.10 with VFS491