pure ftpd : how to set owner on files uploaded

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





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








3















I have a debian with pure ftpd installed with virtual users.



I used the documentation for my setup so the local account of pure ftpd is ftpuser:ftpgroup
When a user uploads a file, the file is owned by ftpuser:ftpgroup. I want the uploaded file to be owned by another system user (mylocaluser). I added my virtual user this way :



pure-pw useradd uploadimages -u mylocaluser -d /var/www/mysite/current/images









share|improve this question






























    3















    I have a debian with pure ftpd installed with virtual users.



    I used the documentation for my setup so the local account of pure ftpd is ftpuser:ftpgroup
    When a user uploads a file, the file is owned by ftpuser:ftpgroup. I want the uploaded file to be owned by another system user (mylocaluser). I added my virtual user this way :



    pure-pw useradd uploadimages -u mylocaluser -d /var/www/mysite/current/images









    share|improve this question


























      3












      3








      3








      I have a debian with pure ftpd installed with virtual users.



      I used the documentation for my setup so the local account of pure ftpd is ftpuser:ftpgroup
      When a user uploads a file, the file is owned by ftpuser:ftpgroup. I want the uploaded file to be owned by another system user (mylocaluser). I added my virtual user this way :



      pure-pw useradd uploadimages -u mylocaluser -d /var/www/mysite/current/images









      share|improve this question
















      I have a debian with pure ftpd installed with virtual users.



      I used the documentation for my setup so the local account of pure ftpd is ftpuser:ftpgroup
      When a user uploads a file, the file is owned by ftpuser:ftpgroup. I want the uploaded file to be owned by another system user (mylocaluser). I added my virtual user this way :



      pure-pw useradd uploadimages -u mylocaluser -d /var/www/mysite/current/images






      debian pure-ftpd






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Mar 18 at 3:09









      Rui F Ribeiro

      42.1k1484142




      42.1k1484142










      asked Aug 23 '12 at 12:41









      JérémieJérémie

      184




      184




















          1 Answer
          1






          active

          oldest

          votes


















          5














          Pure-FTPD has something like MYSQLGetUID and MYSQLGetGID for specifying queries to get UID/GID. Depending on your mysql table you can use something like this:



          MYSQLGetUID SELECT Uid FROM ftpd WHERE User="L" AND status="1"
          MYSQLGetGID SELECT Gid FROM ftpd WHERE User="L" AND status="1"


          under the MYSQLGetPW query definition. More info in documentation fo Pure-FTPD, section MySQL authentication




          OK, my bad I didn't read carefully that you're using PureDB to store users. After you create user you can modify it's info like this:



          pure-pw usermod uploadimages -u UID -g GID


          then check with pure-pw show uploadimages if the UID/GID are correct.






          share|improve this answer

























          • Thks! I was using -u mylocaluser and it seems to work better with the UID. OR maybe you have to provide a group GID too.

            – Jérémie
            Aug 27 '12 at 7:31











          Your Answer








          StackExchange.ready(function()
          var channelOptions =
          tags: "".split(" "),
          id: "106"
          ;
          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: false,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: null,
          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
          );



          );













          draft saved

          draft discarded


















          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f46161%2fpure-ftpd-how-to-set-owner-on-files-uploaded%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









          5














          Pure-FTPD has something like MYSQLGetUID and MYSQLGetGID for specifying queries to get UID/GID. Depending on your mysql table you can use something like this:



          MYSQLGetUID SELECT Uid FROM ftpd WHERE User="L" AND status="1"
          MYSQLGetGID SELECT Gid FROM ftpd WHERE User="L" AND status="1"


          under the MYSQLGetPW query definition. More info in documentation fo Pure-FTPD, section MySQL authentication




          OK, my bad I didn't read carefully that you're using PureDB to store users. After you create user you can modify it's info like this:



          pure-pw usermod uploadimages -u UID -g GID


          then check with pure-pw show uploadimages if the UID/GID are correct.






          share|improve this answer

























          • Thks! I was using -u mylocaluser and it seems to work better with the UID. OR maybe you have to provide a group GID too.

            – Jérémie
            Aug 27 '12 at 7:31















          5














          Pure-FTPD has something like MYSQLGetUID and MYSQLGetGID for specifying queries to get UID/GID. Depending on your mysql table you can use something like this:



          MYSQLGetUID SELECT Uid FROM ftpd WHERE User="L" AND status="1"
          MYSQLGetGID SELECT Gid FROM ftpd WHERE User="L" AND status="1"


          under the MYSQLGetPW query definition. More info in documentation fo Pure-FTPD, section MySQL authentication




          OK, my bad I didn't read carefully that you're using PureDB to store users. After you create user you can modify it's info like this:



          pure-pw usermod uploadimages -u UID -g GID


          then check with pure-pw show uploadimages if the UID/GID are correct.






          share|improve this answer

























          • Thks! I was using -u mylocaluser and it seems to work better with the UID. OR maybe you have to provide a group GID too.

            – Jérémie
            Aug 27 '12 at 7:31













          5












          5








          5







          Pure-FTPD has something like MYSQLGetUID and MYSQLGetGID for specifying queries to get UID/GID. Depending on your mysql table you can use something like this:



          MYSQLGetUID SELECT Uid FROM ftpd WHERE User="L" AND status="1"
          MYSQLGetGID SELECT Gid FROM ftpd WHERE User="L" AND status="1"


          under the MYSQLGetPW query definition. More info in documentation fo Pure-FTPD, section MySQL authentication




          OK, my bad I didn't read carefully that you're using PureDB to store users. After you create user you can modify it's info like this:



          pure-pw usermod uploadimages -u UID -g GID


          then check with pure-pw show uploadimages if the UID/GID are correct.






          share|improve this answer















          Pure-FTPD has something like MYSQLGetUID and MYSQLGetGID for specifying queries to get UID/GID. Depending on your mysql table you can use something like this:



          MYSQLGetUID SELECT Uid FROM ftpd WHERE User="L" AND status="1"
          MYSQLGetGID SELECT Gid FROM ftpd WHERE User="L" AND status="1"


          under the MYSQLGetPW query definition. More info in documentation fo Pure-FTPD, section MySQL authentication




          OK, my bad I didn't read carefully that you're using PureDB to store users. After you create user you can modify it's info like this:



          pure-pw usermod uploadimages -u UID -g GID


          then check with pure-pw show uploadimages if the UID/GID are correct.







          share|improve this answer














          share|improve this answer



          share|improve this answer








          edited Aug 26 '12 at 13:13

























          answered Aug 26 '12 at 13:06









          DawidDawid

          18316




          18316












          • Thks! I was using -u mylocaluser and it seems to work better with the UID. OR maybe you have to provide a group GID too.

            – Jérémie
            Aug 27 '12 at 7:31

















          • Thks! I was using -u mylocaluser and it seems to work better with the UID. OR maybe you have to provide a group GID too.

            – Jérémie
            Aug 27 '12 at 7:31
















          Thks! I was using -u mylocaluser and it seems to work better with the UID. OR maybe you have to provide a group GID too.

          – Jérémie
          Aug 27 '12 at 7:31





          Thks! I was using -u mylocaluser and it seems to work better with the UID. OR maybe you have to provide a group GID too.

          – Jérémie
          Aug 27 '12 at 7:31

















          draft saved

          draft discarded
















































          Thanks for contributing an answer to Unix & Linux Stack Exchange!


          • 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%2funix.stackexchange.com%2fquestions%2f46161%2fpure-ftpd-how-to-set-owner-on-files-uploaded%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

          How to check contact read email or not when send email to Individual?

          Displaying single band from multi-band raster using QGIS

          How many registers does an x86_64 CPU actually have?