How to make files and folder that belong to www-data, readable and writable by my user using sFTPSFTP permission denied on files owned by www-dataIssue with www-data user and /home/user/www permissionsUser access to FTP and at same time set www-data as owner/groupFailed to SFTP connectionConnection abort when trying to log in to chroot jailed account via sftpUsing ControlMaster with user www-dataFiles/folders as group-owner www-data and SFTP as a different user

Radar Altimeter in Space Shuttle

Why did Grima shed a tear?

Why does Wonder Woman say "goodbye brother" to Ares?

Travel with Expired Greek Passport from UK to Greece and Return

Precious Stone, as Clear as Diamond

Alternatives to boxes

C function to check the validity of a date in DD.MM.YYYY format

How much transparency about runway should I expect from startup employer?

How to initiate a conversation with a person who recently had transition but you were not in touch with them?

Plot problems: vertical lines and letters

Is is likely that my lack of post-secondary education is holding my resume back?

Uncountably many functions coinciding only finitely many values

Hell0 W0rld! scored by ASCII values

How to help my son improve without being discouraging?

Why is the Falcon Heavy center core recovery done at sea?

Why is the past tense of vomit generally spelled 'vomited' rather than 'vomitted'?

How can I find the weakness of our "Quality Assurance Process"?

Is it possible to have a healthy work-life balance as a professor?

Can a stolen Android phone with USB debugging enabled have screen lock bypassed?

Are there any spells that aren't on any class's spell list?

Continents with simplex noise

How does an aircraft descend without its nose pointing down?

Where do overtones in a 555 generated square wave come from?

indent and noindent: details from Knuth's The TeXbook



How to make files and folder that belong to www-data, readable and writable by my user using sFTP


SFTP permission denied on files owned by www-dataIssue with www-data user and /home/user/www permissionsUser access to FTP and at same time set www-data as owner/groupFailed to SFTP connectionConnection abort when trying to log in to chroot jailed account via sftpUsing ControlMaster with user www-dataFiles/folders as group-owner www-data and SFTP as a different user






.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty
margin-bottom:0;









1

















I've configured Wordpress on an Ubuntu server v18 and assigned all files and directories the group www-data and assigned them to the user www-data: this way I should be able to update Wordpress from the web interface.



I'd also like to edit files using FileZilla od PHPStorm and to connect to my server I use sFTP.



The problem is that, as the files and directories are assigned to www-data, I cannot edit or remove files and directories.



I've tried to add my user to the group www-data, but I'm still not able to edit or remove them.



How can I set permissions, users and groups in a way that both Wordpress and I are able to edit and remove files and directories?










share|improve this question
































    1

















    I've configured Wordpress on an Ubuntu server v18 and assigned all files and directories the group www-data and assigned them to the user www-data: this way I should be able to update Wordpress from the web interface.



    I'd also like to edit files using FileZilla od PHPStorm and to connect to my server I use sFTP.



    The problem is that, as the files and directories are assigned to www-data, I cannot edit or remove files and directories.



    I've tried to add my user to the group www-data, but I'm still not able to edit or remove them.



    How can I set permissions, users and groups in a way that both Wordpress and I are able to edit and remove files and directories?










    share|improve this question




























      1












      1








      1








      I've configured Wordpress on an Ubuntu server v18 and assigned all files and directories the group www-data and assigned them to the user www-data: this way I should be able to update Wordpress from the web interface.



      I'd also like to edit files using FileZilla od PHPStorm and to connect to my server I use sFTP.



      The problem is that, as the files and directories are assigned to www-data, I cannot edit or remove files and directories.



      I've tried to add my user to the group www-data, but I'm still not able to edit or remove them.



      How can I set permissions, users and groups in a way that both Wordpress and I are able to edit and remove files and directories?










      share|improve this question















      I've configured Wordpress on an Ubuntu server v18 and assigned all files and directories the group www-data and assigned them to the user www-data: this way I should be able to update Wordpress from the web interface.



      I'd also like to edit files using FileZilla od PHPStorm and to connect to my server I use sFTP.



      The problem is that, as the files and directories are assigned to www-data, I cannot edit or remove files and directories.



      I've tried to add my user to the group www-data, but I'm still not able to edit or remove them.



      How can I set permissions, users and groups in a way that both Wordpress and I are able to edit and remove files and directories?







      permissions ssh sftp






      share|improve this question














      share|improve this question











      share|improve this question




      share|improve this question










      asked Jun 8 at 18:04









      AerendirAerendir

      1064 bronze badges




      1064 bronze badges























          1 Answer
          1






          active

          oldest

          votes


















          0


















          The best method (in my opinion) would be to use /etc/crontab to start a script or a service with a directorywatcher. The latter is very easy to make with the watchdog module in python.



          In that script you would then first make a timestamped backup before moving files to the webservers directories. Both /etc/crontab and a service would allow you to copy the files as the user www-data.



          A directorywatcher would watch over the FTP directory you use to put files on the server (and that would be a dedicated directory not related to the webservers directories). That makes it a bit more secure too.






          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/4.0/"u003ecc by-sa 4.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
            );



            );














            draft saved

            draft discarded
















            StackExchange.ready(
            function ()
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1149633%2fhow-to-make-files-and-folder-that-belong-to-www-data-readable-and-writable-by-m%23new-answer', 'question_page');

            );

            Post as a guest















            Required, but never shown


























            1 Answer
            1






            active

            oldest

            votes








            1 Answer
            1






            active

            oldest

            votes









            active

            oldest

            votes






            active

            oldest

            votes









            0


















            The best method (in my opinion) would be to use /etc/crontab to start a script or a service with a directorywatcher. The latter is very easy to make with the watchdog module in python.



            In that script you would then first make a timestamped backup before moving files to the webservers directories. Both /etc/crontab and a service would allow you to copy the files as the user www-data.



            A directorywatcher would watch over the FTP directory you use to put files on the server (and that would be a dedicated directory not related to the webservers directories). That makes it a bit more secure too.






            share|improve this answer






























              0


















              The best method (in my opinion) would be to use /etc/crontab to start a script or a service with a directorywatcher. The latter is very easy to make with the watchdog module in python.



              In that script you would then first make a timestamped backup before moving files to the webservers directories. Both /etc/crontab and a service would allow you to copy the files as the user www-data.



              A directorywatcher would watch over the FTP directory you use to put files on the server (and that would be a dedicated directory not related to the webservers directories). That makes it a bit more secure too.






              share|improve this answer




























                0














                0










                0









                The best method (in my opinion) would be to use /etc/crontab to start a script or a service with a directorywatcher. The latter is very easy to make with the watchdog module in python.



                In that script you would then first make a timestamped backup before moving files to the webservers directories. Both /etc/crontab and a service would allow you to copy the files as the user www-data.



                A directorywatcher would watch over the FTP directory you use to put files on the server (and that would be a dedicated directory not related to the webservers directories). That makes it a bit more secure too.






                share|improve this answer














                The best method (in my opinion) would be to use /etc/crontab to start a script or a service with a directorywatcher. The latter is very easy to make with the watchdog module in python.



                In that script you would then first make a timestamped backup before moving files to the webservers directories. Both /etc/crontab and a service would allow you to copy the files as the user www-data.



                A directorywatcher would watch over the FTP directory you use to put files on the server (and that would be a dedicated directory not related to the webservers directories). That makes it a bit more secure too.







                share|improve this answer













                share|improve this answer




                share|improve this answer










                answered Jun 8 at 18:18









                RinzwindRinzwind

                224k29 gold badges432 silver badges577 bronze badges




                224k29 gold badges432 silver badges577 bronze badges































                    draft saved

                    draft discarded















































                    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%2f1149633%2fhow-to-make-files-and-folder-that-belong-to-www-data-readable-and-writable-by-m%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

                    Tamil (spriik) Luke uk diar | Nawigatjuun

                    Align equal signs while including text over equalitiesAMS align: left aligned text/math plus multicolumn alignmentMultiple alignmentsAligning equations in multiple placesNumbering and aligning an equation with multiple columnsHow to align one equation with another multline equationUsing \ in environments inside the begintabularxNumber equations and preserving alignment of equal signsHow can I align equations to the left and to the right?Double equation alignment problem within align enviromentAligned within align: Why are they right-aligned?

                    Where does the image of a data connector as a sharp metal spike originate from?Where does the concept of infected people turning into zombies only after death originate from?Where does the motif of a reanimated human head originate?Where did the notion that Dragons could speak originate?Where does the archetypal image of the 'Grey' alien come from?Where did the suffix '-Man' originate?Where does the notion of being injured or killed by an illusion originate?Where did the term “sophont” originate?Where does the trope of magic spells being driven by advanced technology originate from?Where did the term “the living impaired” originate?