Adding Apache to User GroupUser permissions on upload directorywwwdata user not working when permissions are 400-500 - 403 forbidden accessApache permissions issueUnderstanding Group PermissionsUser access to FTP and at same time set www-data as owner/groupWordpress: Unpacking the package… Could not create directoryApache - Allow access to user home directories

I shift the source code, you shift the input!

I keep rewriting the same section of my story. How do I move forward?

What are the downsides of being a debt-free country (no foreign national debt)?

To find number of real roots

What does it mean to play in a mode?

Finding the time domain equation corresponding to a given DFT

Can the President be impeached twice?

Secure Implementation of Password Database

Why is Trump not being impeached for bribery?

Will the same Javascript fetched by HTTP and HTTPS be cached separately by the browser?

Does the basis graph of a matroid determine it?

Is it Possible to Catch an Unknown Exception?

Is it possible for a tiger's tail to be taken off and replaced with a living cobra, with both creatures still alive?

Did all integrated Commodore PET monitors always use 60 Hz refresh?

Countable and uncountable number

How did 達 (~tachi) come to mean `pluralize` something?

How do I force `sudo` to ask for a password each time when a specific command is used?

Why is 1>a.txt 2>&1 different from 1>a.txt 2>a.txt ? (Example shown)

Why is there a preference to use the cumulative distribution function to characterise a random variable instead of the probability density function?

Why didn't the British consider the USS President's attempted flight as a fake surrender?

How to answer my 5 year old why I can tell her what she has to do, and why she can't tell me what to do

Unexpected large rent payments, by moneygram, for my apartment, not by me

Can I ignore an open source license if I checkout a version that was released prior to the code having any license?

Can we use a Cryptographic hash function to generate infinite random numbers?



Adding Apache to User Group


User permissions on upload directorywwwdata user not working when permissions are 400-500 - 403 forbidden accessApache permissions issueUnderstanding Group PermissionsUser access to FTP and at same time set www-data as owner/groupWordpress: Unpacking the package… Could not create directoryApache - Allow access to user home directories






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









5


















We have a small LAMP server running Ubuntu 12.04 LTS which contains a few sites. Access to the vhosts directories is set to root:AndSpecialSFTPGroup. This works fine in general. However, some of the sites run on a CMS which need write access to particular folders. This is now not working, because the Apache user is www-data.



Simple question: Is OK to add the www-data to the AndSpecialSFTPGroup group in order to grant it rwx permissions. Or is this the wrong approach altogether.



Or should the owner of the website folders be www-data?










share|improve this question

































    5


















    We have a small LAMP server running Ubuntu 12.04 LTS which contains a few sites. Access to the vhosts directories is set to root:AndSpecialSFTPGroup. This works fine in general. However, some of the sites run on a CMS which need write access to particular folders. This is now not working, because the Apache user is www-data.



    Simple question: Is OK to add the www-data to the AndSpecialSFTPGroup group in order to grant it rwx permissions. Or is this the wrong approach altogether.



    Or should the owner of the website folders be www-data?










    share|improve this question





























      5













      5









      5








      We have a small LAMP server running Ubuntu 12.04 LTS which contains a few sites. Access to the vhosts directories is set to root:AndSpecialSFTPGroup. This works fine in general. However, some of the sites run on a CMS which need write access to particular folders. This is now not working, because the Apache user is www-data.



      Simple question: Is OK to add the www-data to the AndSpecialSFTPGroup group in order to grant it rwx permissions. Or is this the wrong approach altogether.



      Or should the owner of the website folders be www-data?










      share|improve this question
















      We have a small LAMP server running Ubuntu 12.04 LTS which contains a few sites. Access to the vhosts directories is set to root:AndSpecialSFTPGroup. This works fine in general. However, some of the sites run on a CMS which need write access to particular folders. This is now not working, because the Apache user is www-data.



      Simple question: Is OK to add the www-data to the AndSpecialSFTPGroup group in order to grant it rwx permissions. Or is this the wrong approach altogether.



      Or should the owner of the website folders be www-data?







      12.04 permissions apache2






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Sep 30 at 16:55









      Eliah Kagan

      96.8k25 gold badges262 silver badges453 bronze badges




      96.8k25 gold badges262 silver badges453 bronze badges










      asked Nov 6 '12 at 5:25









      Adrian WagnerAdrian Wagner

      531 gold badge1 silver badge3 bronze badges




      531 gold badge1 silver badge3 bronze badges























          2 Answers
          2






          active

          oldest

          votes


















          2



















          There are a few ways you could approach this, but you can add www-data to that group like so:



          sudo usermod -a -G AndSpecialSFTPGroup www-data


          As far as "Is it the right way to do this?" Like I said, there are many ways to accomplish this, but it's similar to asking me what's the best way to arrange your desk. In many facets of IT, development, and OS, there are choices left up to preference.



          This is the way I prefer to handle permissions like this because if I screw something up, I can easily remove the user from the group again. You might like using chown to give all the files to www-data, or something else altogether.



          My way is a right way to do this, which is why I most likely won't get flagged for being subjective, but there are other ways. (Like I mentioned chown, create another user, chmod to change the permissions overall, etc...)






          share|improve this answer



























          • Thanks, Kyle. What I am mostly 'wondering' about, is if this is an appropriate approach....

            – Adrian Wagner
            Nov 6 '12 at 7:28











          • It is @AdrianWagner

            – Rinzwind
            Nov 6 '12 at 7:35











          • @AdrianWagner See my updated answer

            – Kyle Macey
            Nov 6 '12 at 14:34











          • Thanks again, Kyle. That was the answer I needed. I knew I could solve it this way, but was wondering if there were be no-no's attached to it.

            – Adrian Wagner
            Nov 7 '12 at 2:55











          • useradd (like usermod) is always a bit dangerous -- be careful to use -G and not -g.

            – guntbert
            Oct 26 '13 at 11:32


















          2



















          This is an old post, but I got to it via Google as the top result for "ubunut add apache to a group".



          Since the www-data user already exists the command should be usermod, which is used to modify an existing user.



          sudo usermod -a -G AndSpecialSFTPGroup www-data


          You can then confirm the change by executing



          id www-data





          share|improve this answer

























          • usermod is always a bit dangerous -- be careful to use -G and not -g.

            – guntbert
            Oct 26 '13 at 11:29












          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%2f213489%2fadding-apache-to-user-group%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









          2



















          There are a few ways you could approach this, but you can add www-data to that group like so:



          sudo usermod -a -G AndSpecialSFTPGroup www-data


          As far as "Is it the right way to do this?" Like I said, there are many ways to accomplish this, but it's similar to asking me what's the best way to arrange your desk. In many facets of IT, development, and OS, there are choices left up to preference.



          This is the way I prefer to handle permissions like this because if I screw something up, I can easily remove the user from the group again. You might like using chown to give all the files to www-data, or something else altogether.



          My way is a right way to do this, which is why I most likely won't get flagged for being subjective, but there are other ways. (Like I mentioned chown, create another user, chmod to change the permissions overall, etc...)






          share|improve this answer



























          • Thanks, Kyle. What I am mostly 'wondering' about, is if this is an appropriate approach....

            – Adrian Wagner
            Nov 6 '12 at 7:28











          • It is @AdrianWagner

            – Rinzwind
            Nov 6 '12 at 7:35











          • @AdrianWagner See my updated answer

            – Kyle Macey
            Nov 6 '12 at 14:34











          • Thanks again, Kyle. That was the answer I needed. I knew I could solve it this way, but was wondering if there were be no-no's attached to it.

            – Adrian Wagner
            Nov 7 '12 at 2:55











          • useradd (like usermod) is always a bit dangerous -- be careful to use -G and not -g.

            – guntbert
            Oct 26 '13 at 11:32















          2



















          There are a few ways you could approach this, but you can add www-data to that group like so:



          sudo usermod -a -G AndSpecialSFTPGroup www-data


          As far as "Is it the right way to do this?" Like I said, there are many ways to accomplish this, but it's similar to asking me what's the best way to arrange your desk. In many facets of IT, development, and OS, there are choices left up to preference.



          This is the way I prefer to handle permissions like this because if I screw something up, I can easily remove the user from the group again. You might like using chown to give all the files to www-data, or something else altogether.



          My way is a right way to do this, which is why I most likely won't get flagged for being subjective, but there are other ways. (Like I mentioned chown, create another user, chmod to change the permissions overall, etc...)






          share|improve this answer



























          • Thanks, Kyle. What I am mostly 'wondering' about, is if this is an appropriate approach....

            – Adrian Wagner
            Nov 6 '12 at 7:28











          • It is @AdrianWagner

            – Rinzwind
            Nov 6 '12 at 7:35











          • @AdrianWagner See my updated answer

            – Kyle Macey
            Nov 6 '12 at 14:34











          • Thanks again, Kyle. That was the answer I needed. I knew I could solve it this way, but was wondering if there were be no-no's attached to it.

            – Adrian Wagner
            Nov 7 '12 at 2:55











          • useradd (like usermod) is always a bit dangerous -- be careful to use -G and not -g.

            – guntbert
            Oct 26 '13 at 11:32













          2















          2











          2









          There are a few ways you could approach this, but you can add www-data to that group like so:



          sudo usermod -a -G AndSpecialSFTPGroup www-data


          As far as "Is it the right way to do this?" Like I said, there are many ways to accomplish this, but it's similar to asking me what's the best way to arrange your desk. In many facets of IT, development, and OS, there are choices left up to preference.



          This is the way I prefer to handle permissions like this because if I screw something up, I can easily remove the user from the group again. You might like using chown to give all the files to www-data, or something else altogether.



          My way is a right way to do this, which is why I most likely won't get flagged for being subjective, but there are other ways. (Like I mentioned chown, create another user, chmod to change the permissions overall, etc...)






          share|improve this answer
















          There are a few ways you could approach this, but you can add www-data to that group like so:



          sudo usermod -a -G AndSpecialSFTPGroup www-data


          As far as "Is it the right way to do this?" Like I said, there are many ways to accomplish this, but it's similar to asking me what's the best way to arrange your desk. In many facets of IT, development, and OS, there are choices left up to preference.



          This is the way I prefer to handle permissions like this because if I screw something up, I can easily remove the user from the group again. You might like using chown to give all the files to www-data, or something else altogether.



          My way is a right way to do this, which is why I most likely won't get flagged for being subjective, but there are other ways. (Like I mentioned chown, create another user, chmod to change the permissions overall, etc...)







          share|improve this answer















          share|improve this answer




          share|improve this answer








          edited Oct 26 '13 at 16:28

























          answered Nov 6 '12 at 5:33









          Kyle MaceyKyle Macey

          1,65916 silver badges25 bronze badges




          1,65916 silver badges25 bronze badges















          • Thanks, Kyle. What I am mostly 'wondering' about, is if this is an appropriate approach....

            – Adrian Wagner
            Nov 6 '12 at 7:28











          • It is @AdrianWagner

            – Rinzwind
            Nov 6 '12 at 7:35











          • @AdrianWagner See my updated answer

            – Kyle Macey
            Nov 6 '12 at 14:34











          • Thanks again, Kyle. That was the answer I needed. I knew I could solve it this way, but was wondering if there were be no-no's attached to it.

            – Adrian Wagner
            Nov 7 '12 at 2:55











          • useradd (like usermod) is always a bit dangerous -- be careful to use -G and not -g.

            – guntbert
            Oct 26 '13 at 11:32

















          • Thanks, Kyle. What I am mostly 'wondering' about, is if this is an appropriate approach....

            – Adrian Wagner
            Nov 6 '12 at 7:28











          • It is @AdrianWagner

            – Rinzwind
            Nov 6 '12 at 7:35











          • @AdrianWagner See my updated answer

            – Kyle Macey
            Nov 6 '12 at 14:34











          • Thanks again, Kyle. That was the answer I needed. I knew I could solve it this way, but was wondering if there were be no-no's attached to it.

            – Adrian Wagner
            Nov 7 '12 at 2:55











          • useradd (like usermod) is always a bit dangerous -- be careful to use -G and not -g.

            – guntbert
            Oct 26 '13 at 11:32
















          Thanks, Kyle. What I am mostly 'wondering' about, is if this is an appropriate approach....

          – Adrian Wagner
          Nov 6 '12 at 7:28





          Thanks, Kyle. What I am mostly 'wondering' about, is if this is an appropriate approach....

          – Adrian Wagner
          Nov 6 '12 at 7:28













          It is @AdrianWagner

          – Rinzwind
          Nov 6 '12 at 7:35





          It is @AdrianWagner

          – Rinzwind
          Nov 6 '12 at 7:35













          @AdrianWagner See my updated answer

          – Kyle Macey
          Nov 6 '12 at 14:34





          @AdrianWagner See my updated answer

          – Kyle Macey
          Nov 6 '12 at 14:34













          Thanks again, Kyle. That was the answer I needed. I knew I could solve it this way, but was wondering if there were be no-no's attached to it.

          – Adrian Wagner
          Nov 7 '12 at 2:55





          Thanks again, Kyle. That was the answer I needed. I knew I could solve it this way, but was wondering if there were be no-no's attached to it.

          – Adrian Wagner
          Nov 7 '12 at 2:55













          useradd (like usermod) is always a bit dangerous -- be careful to use -G and not -g.

          – guntbert
          Oct 26 '13 at 11:32





          useradd (like usermod) is always a bit dangerous -- be careful to use -G and not -g.

          – guntbert
          Oct 26 '13 at 11:32













          2



















          This is an old post, but I got to it via Google as the top result for "ubunut add apache to a group".



          Since the www-data user already exists the command should be usermod, which is used to modify an existing user.



          sudo usermod -a -G AndSpecialSFTPGroup www-data


          You can then confirm the change by executing



          id www-data





          share|improve this answer

























          • usermod is always a bit dangerous -- be careful to use -G and not -g.

            – guntbert
            Oct 26 '13 at 11:29















          2



















          This is an old post, but I got to it via Google as the top result for "ubunut add apache to a group".



          Since the www-data user already exists the command should be usermod, which is used to modify an existing user.



          sudo usermod -a -G AndSpecialSFTPGroup www-data


          You can then confirm the change by executing



          id www-data





          share|improve this answer

























          • usermod is always a bit dangerous -- be careful to use -G and not -g.

            – guntbert
            Oct 26 '13 at 11:29













          2















          2











          2









          This is an old post, but I got to it via Google as the top result for "ubunut add apache to a group".



          Since the www-data user already exists the command should be usermod, which is used to modify an existing user.



          sudo usermod -a -G AndSpecialSFTPGroup www-data


          You can then confirm the change by executing



          id www-data





          share|improve this answer














          This is an old post, but I got to it via Google as the top result for "ubunut add apache to a group".



          Since the www-data user already exists the command should be usermod, which is used to modify an existing user.



          sudo usermod -a -G AndSpecialSFTPGroup www-data


          You can then confirm the change by executing



          id www-data






          share|improve this answer













          share|improve this answer




          share|improve this answer










          answered Oct 26 '13 at 6:33









          thetitanthetitan

          212 bronze badges




          212 bronze badges















          • usermod is always a bit dangerous -- be careful to use -G and not -g.

            – guntbert
            Oct 26 '13 at 11:29

















          • usermod is always a bit dangerous -- be careful to use -G and not -g.

            – guntbert
            Oct 26 '13 at 11:29
















          usermod is always a bit dangerous -- be careful to use -G and not -g.

          – guntbert
          Oct 26 '13 at 11:29





          usermod is always a bit dangerous -- be careful to use -G and not -g.

          – guntbert
          Oct 26 '13 at 11:29


















          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%2f213489%2fadding-apache-to-user-group%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?