How to access /var/www/html folder from ubuntu user through SFTPFiles copied to folder in var/www disappears...

Will rerolling initiative each round stop meta-gaming about initiative?

Article. The word "Respect"

How can the probability of a fumble decrease linearly with more dice?

How to not let the Identify spell spoil everything?

If angels and devils are the same species, why would their mortal offspring appear physically different?

"Starve to death" Vs. "Starve to the point of death"

Renting a 2CV in France

Why did Luke use his left hand to shoot?

A starship is travelling at 0.9c and collides with a small rock. Will it leave a clean hole through, or will more happen?

Is there a way to not have to poll the UART of an AVR?

How to politely refuse in-office gym instructor for steroids and protein

Website seeing my Facebook data?

Why do neural networks need so many training examples to perform?

Does the US government have any planning in place to ensure there's no shortages of food, fuel, steel and other commodities?

Why didn't the 2019 Oscars have a host?

Has any human ever had the choice to leave Earth permanently?

Not a Long-Winded Riddle

Why is that max-Q doesn't occur in transonic regime?

The No-Straight Maze

Plausible reason to leave the Solar System?

Can you determine if focus is sharp without diopter adjustment if your sight is imperfect?

How do you get out of your own psychology to write characters?

Critique vs nitpicking

How do you funnel food off a cutting board?



How to access /var/www/html folder from ubuntu user through SFTP


Files copied to folder in var/www disappears on restartPermission denied while writing a file in var/www in spite of adding me to user groupBest way to configure apache2 access rightsI want to create an FTP account that can oversee multiple other FTP accounts. How should I manage my permissions and users?User has full access with FTP, limited access with SFTPhow to add a user directory in apache on ubuntuHow to add files to /var/www/html/ without using the terminal?Files/folders as group-owner www-data and SFTP as a different userApache permissions to allow both user and web server to edit /var/www/var/www/ Security













1















I messed up with some permission level on /var/www/ and /var/www/html/folders by running some random commands through putty.



Initially I want to add or edit some files in /var/www/html/ and I executed some commands which give me the permission to add or edit files through SFTP. But it causes a problem and I was unable to update or create any files through webserver apache.



After then I executed some random commands which gives apache to view and edit files under /var/www/html/ but I m not not able to view files from SFTP.



I have attached some screenshot of folder permission



My Configurtion



OS: Ubuntu 18.04
Provider: AWS
FTP Username: ubuntu


I logged in to SFTP through PPK files



Now I want to gain access through SFTP to /var/www/html/



enter image description here



enter image description here










share|improve this question







New contributor




PlanetHackers is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.

























    1















    I messed up with some permission level on /var/www/ and /var/www/html/folders by running some random commands through putty.



    Initially I want to add or edit some files in /var/www/html/ and I executed some commands which give me the permission to add or edit files through SFTP. But it causes a problem and I was unable to update or create any files through webserver apache.



    After then I executed some random commands which gives apache to view and edit files under /var/www/html/ but I m not not able to view files from SFTP.



    I have attached some screenshot of folder permission



    My Configurtion



    OS: Ubuntu 18.04
    Provider: AWS
    FTP Username: ubuntu


    I logged in to SFTP through PPK files



    Now I want to gain access through SFTP to /var/www/html/



    enter image description here



    enter image description here










    share|improve this question







    New contributor




    PlanetHackers is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
    Check out our Code of Conduct.























      1












      1








      1








      I messed up with some permission level on /var/www/ and /var/www/html/folders by running some random commands through putty.



      Initially I want to add or edit some files in /var/www/html/ and I executed some commands which give me the permission to add or edit files through SFTP. But it causes a problem and I was unable to update or create any files through webserver apache.



      After then I executed some random commands which gives apache to view and edit files under /var/www/html/ but I m not not able to view files from SFTP.



      I have attached some screenshot of folder permission



      My Configurtion



      OS: Ubuntu 18.04
      Provider: AWS
      FTP Username: ubuntu


      I logged in to SFTP through PPK files



      Now I want to gain access through SFTP to /var/www/html/



      enter image description here



      enter image description here










      share|improve this question







      New contributor




      PlanetHackers is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.












      I messed up with some permission level on /var/www/ and /var/www/html/folders by running some random commands through putty.



      Initially I want to add or edit some files in /var/www/html/ and I executed some commands which give me the permission to add or edit files through SFTP. But it causes a problem and I was unable to update or create any files through webserver apache.



      After then I executed some random commands which gives apache to view and edit files under /var/www/html/ but I m not not able to view files from SFTP.



      I have attached some screenshot of folder permission



      My Configurtion



      OS: Ubuntu 18.04
      Provider: AWS
      FTP Username: ubuntu


      I logged in to SFTP through PPK files



      Now I want to gain access through SFTP to /var/www/html/



      enter image description here



      enter image description here







      server permissions ssh apache2 sftp






      share|improve this question







      New contributor




      PlanetHackers is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.











      share|improve this question







      New contributor




      PlanetHackers is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.









      share|improve this question




      share|improve this question






      New contributor




      PlanetHackers is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.









      asked yesterday









      PlanetHackersPlanetHackers

      1062




      1062




      New contributor




      PlanetHackers is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.





      New contributor





      PlanetHackers is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.






      PlanetHackers is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.






















          2 Answers
          2






          active

          oldest

          votes


















          0














          You need to log in as a user with sudo permission, or as root. If the user does not have root permission, they have to respect the folder owner



          And since the owner is apache, of course certain non sudo users can't access it






          share|improve this answer
























          • I am able to logged in as root through putty by command sudo su -. But I logged into FTP account through ubuntu user

            – PlanetHackers
            yesterday











          • @PlanetHackers the user must be sudo, or the root user

            – colbycdev
            yesterday











          • I know that sudo su - do the same

            – PlanetHackers
            10 hours ago



















          0














          I manage with similar case in that way:



          groupadd web
          groupmems -g web -a myuser
          chown -R .web /var/www/html/
          chmod -R g+w /var/www/html/
          mkdir ~myuser/web
          mount --bind /var/www/html/ ~myuser/web


          Explanation: create group for myuser (and others) and mount point in his mode directory. Then mount --bind apache dir.



          You have to add mount to the start script.



          Now you will have access to apache dir from your home.






          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',
            autoActivateHeartbeat: false,
            convertImagesToLinks: true,
            noModals: true,
            showLowRepImageUploadWarning: true,
            reputationToPostImages: 10,
            bindNavPrevention: true,
            postfix: "",
            imageUploader: {
            brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
            contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
            allowUrls: true
            },
            onDemand: true,
            discardSelector: ".discard-answer"
            ,immediatelyShowMarkdownHelp:true
            });


            }
            });






            PlanetHackers is a new contributor. Be nice, and check out our Code of Conduct.










            draft saved

            draft discarded


















            StackExchange.ready(
            function () {
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1120863%2fhow-to-access-var-www-html-folder-from-ubuntu-user-through-sftp%23new-answer', 'question_page');
            }
            );

            Post as a guest















            Required, but never shown

























            2 Answers
            2






            active

            oldest

            votes








            2 Answers
            2






            active

            oldest

            votes









            active

            oldest

            votes






            active

            oldest

            votes









            0














            You need to log in as a user with sudo permission, or as root. If the user does not have root permission, they have to respect the folder owner



            And since the owner is apache, of course certain non sudo users can't access it






            share|improve this answer
























            • I am able to logged in as root through putty by command sudo su -. But I logged into FTP account through ubuntu user

              – PlanetHackers
              yesterday











            • @PlanetHackers the user must be sudo, or the root user

              – colbycdev
              yesterday











            • I know that sudo su - do the same

              – PlanetHackers
              10 hours ago
















            0














            You need to log in as a user with sudo permission, or as root. If the user does not have root permission, they have to respect the folder owner



            And since the owner is apache, of course certain non sudo users can't access it






            share|improve this answer
























            • I am able to logged in as root through putty by command sudo su -. But I logged into FTP account through ubuntu user

              – PlanetHackers
              yesterday











            • @PlanetHackers the user must be sudo, or the root user

              – colbycdev
              yesterday











            • I know that sudo su - do the same

              – PlanetHackers
              10 hours ago














            0












            0








            0







            You need to log in as a user with sudo permission, or as root. If the user does not have root permission, they have to respect the folder owner



            And since the owner is apache, of course certain non sudo users can't access it






            share|improve this answer













            You need to log in as a user with sudo permission, or as root. If the user does not have root permission, they have to respect the folder owner



            And since the owner is apache, of course certain non sudo users can't access it







            share|improve this answer












            share|improve this answer



            share|improve this answer










            answered yesterday









            colbycdevcolbycdev

            12910




            12910













            • I am able to logged in as root through putty by command sudo su -. But I logged into FTP account through ubuntu user

              – PlanetHackers
              yesterday











            • @PlanetHackers the user must be sudo, or the root user

              – colbycdev
              yesterday











            • I know that sudo su - do the same

              – PlanetHackers
              10 hours ago



















            • I am able to logged in as root through putty by command sudo su -. But I logged into FTP account through ubuntu user

              – PlanetHackers
              yesterday











            • @PlanetHackers the user must be sudo, or the root user

              – colbycdev
              yesterday











            • I know that sudo su - do the same

              – PlanetHackers
              10 hours ago

















            I am able to logged in as root through putty by command sudo su -. But I logged into FTP account through ubuntu user

            – PlanetHackers
            yesterday





            I am able to logged in as root through putty by command sudo su -. But I logged into FTP account through ubuntu user

            – PlanetHackers
            yesterday













            @PlanetHackers the user must be sudo, or the root user

            – colbycdev
            yesterday





            @PlanetHackers the user must be sudo, or the root user

            – colbycdev
            yesterday













            I know that sudo su - do the same

            – PlanetHackers
            10 hours ago





            I know that sudo su - do the same

            – PlanetHackers
            10 hours ago













            0














            I manage with similar case in that way:



            groupadd web
            groupmems -g web -a myuser
            chown -R .web /var/www/html/
            chmod -R g+w /var/www/html/
            mkdir ~myuser/web
            mount --bind /var/www/html/ ~myuser/web


            Explanation: create group for myuser (and others) and mount point in his mode directory. Then mount --bind apache dir.



            You have to add mount to the start script.



            Now you will have access to apache dir from your home.






            share|improve this answer




























              0














              I manage with similar case in that way:



              groupadd web
              groupmems -g web -a myuser
              chown -R .web /var/www/html/
              chmod -R g+w /var/www/html/
              mkdir ~myuser/web
              mount --bind /var/www/html/ ~myuser/web


              Explanation: create group for myuser (and others) and mount point in his mode directory. Then mount --bind apache dir.



              You have to add mount to the start script.



              Now you will have access to apache dir from your home.






              share|improve this answer


























                0












                0








                0







                I manage with similar case in that way:



                groupadd web
                groupmems -g web -a myuser
                chown -R .web /var/www/html/
                chmod -R g+w /var/www/html/
                mkdir ~myuser/web
                mount --bind /var/www/html/ ~myuser/web


                Explanation: create group for myuser (and others) and mount point in his mode directory. Then mount --bind apache dir.



                You have to add mount to the start script.



                Now you will have access to apache dir from your home.






                share|improve this answer













                I manage with similar case in that way:



                groupadd web
                groupmems -g web -a myuser
                chown -R .web /var/www/html/
                chmod -R g+w /var/www/html/
                mkdir ~myuser/web
                mount --bind /var/www/html/ ~myuser/web


                Explanation: create group for myuser (and others) and mount point in his mode directory. Then mount --bind apache dir.



                You have to add mount to the start script.



                Now you will have access to apache dir from your home.







                share|improve this answer












                share|improve this answer



                share|improve this answer










                answered 6 hours ago









                Piotr GogolinPiotr Gogolin

                111




                111






















                    PlanetHackers is a new contributor. Be nice, and check out our Code of Conduct.










                    draft saved

                    draft discarded


















                    PlanetHackers is a new contributor. Be nice, and check out our Code of Conduct.













                    PlanetHackers is a new contributor. Be nice, and check out our Code of Conduct.












                    PlanetHackers is a new contributor. Be nice, and check out our Code of Conduct.
















                    Thanks for contributing an answer to Ask Ubuntu!


                    • Please be sure to answer the question. Provide details and share your research!

                    But avoid



                    • Asking for help, clarification, or responding to other answers.

                    • Making statements based on opinion; back them up with references or personal experience.


                    To learn more, see our tips on writing great answers.




                    draft saved


                    draft discarded














                    StackExchange.ready(
                    function () {
                    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1120863%2fhow-to-access-var-www-html-folder-from-ubuntu-user-through-sftp%23new-answer', 'question_page');
                    }
                    );

                    Post as a guest















                    Required, but never shown





















































                    Required, but never shown














                    Required, but never shown












                    Required, but never shown







                    Required, but never shown

































                    Required, but never shown














                    Required, but never shown












                    Required, but never shown







                    Required, but never shown







                    Popular posts from this blog

                    Why do type traits not work with types in namespace scope?What are POD types in C++?Why can templates only be...

                    Will tsunami waves travel forever if there was no land?Why do tsunami waves begin with the water flowing away...

                    Should I use Docker or LXD?How to cache (more) data on SSD/RAM to avoid spin up?Unable to get Windows File...