Is it okay to give permission of `rwx` to my php user outside of web root

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











up vote
0
down vote

favorite












I have two docker containers php and nginx. PHP runs its worker process as www-data and NGINX runs its worker process as nginx. I have following dir structure for my website. web is the docroot. 1000 is the admin/owner.



-rw-rwx--- 1 www-data 1000 357 Oct 23 13:36 .editorconfig
-rw-rwx--- 1 www-data 1000 102 Oct 23 13:30 .env
-rw-rwx--- 1 www-data 1000 746 Oct 19 06:36 .env.example
-rw-rwx--- 1 www-data 1000 3858 Oct 23 13:36 .gitattributes
-rw-rwx--- 1 www-data 1000 492 Oct 19 06:36 .gitignore
-rw-rwx--- 1 www-data 1000 0 Oct 23 13:15 .gitkeep
-rw-rwx--- 1 www-data 1000 1875 Oct 19 06:36 .travis.yml
-rw-rwx--- 1 www-data 1000 18046 Oct 19 06:36 LICENSE
-rw-rwx--- 1 www-data 1000 6502 Oct 19 06:36 README.md
-rw-rwx--- 1 www-data 1000 2299 Oct 19 06:36 composer.json
-rw-rwx--- 1 www-data 1000 276423 Oct 23 13:36 composer.lock
drwxrwx--- 4 www-data 1000 4096 Oct 19 06:36 drush
-rw-rwx--- 1 www-data 1000 414 Oct 19 06:36 load.environment.php
-rw-rwx--- 1 www-data 1000 481 Oct 19 06:36 phpunit.xml.dist
drwxrwx--- 3 www-data 1000 4096 Oct 19 06:36 scripts
drwxrws--- 50 www-data 1000 4096 Oct 24 01:48 vendor
drwxrws--- 7 nginx 1000 4096 Oct 23 13:36 web









share|improve this question

























    up vote
    0
    down vote

    favorite












    I have two docker containers php and nginx. PHP runs its worker process as www-data and NGINX runs its worker process as nginx. I have following dir structure for my website. web is the docroot. 1000 is the admin/owner.



    -rw-rwx--- 1 www-data 1000 357 Oct 23 13:36 .editorconfig
    -rw-rwx--- 1 www-data 1000 102 Oct 23 13:30 .env
    -rw-rwx--- 1 www-data 1000 746 Oct 19 06:36 .env.example
    -rw-rwx--- 1 www-data 1000 3858 Oct 23 13:36 .gitattributes
    -rw-rwx--- 1 www-data 1000 492 Oct 19 06:36 .gitignore
    -rw-rwx--- 1 www-data 1000 0 Oct 23 13:15 .gitkeep
    -rw-rwx--- 1 www-data 1000 1875 Oct 19 06:36 .travis.yml
    -rw-rwx--- 1 www-data 1000 18046 Oct 19 06:36 LICENSE
    -rw-rwx--- 1 www-data 1000 6502 Oct 19 06:36 README.md
    -rw-rwx--- 1 www-data 1000 2299 Oct 19 06:36 composer.json
    -rw-rwx--- 1 www-data 1000 276423 Oct 23 13:36 composer.lock
    drwxrwx--- 4 www-data 1000 4096 Oct 19 06:36 drush
    -rw-rwx--- 1 www-data 1000 414 Oct 19 06:36 load.environment.php
    -rw-rwx--- 1 www-data 1000 481 Oct 19 06:36 phpunit.xml.dist
    drwxrwx--- 3 www-data 1000 4096 Oct 19 06:36 scripts
    drwxrws--- 50 www-data 1000 4096 Oct 24 01:48 vendor
    drwxrws--- 7 nginx 1000 4096 Oct 23 13:36 web









    share|improve this question























      up vote
      0
      down vote

      favorite









      up vote
      0
      down vote

      favorite











      I have two docker containers php and nginx. PHP runs its worker process as www-data and NGINX runs its worker process as nginx. I have following dir structure for my website. web is the docroot. 1000 is the admin/owner.



      -rw-rwx--- 1 www-data 1000 357 Oct 23 13:36 .editorconfig
      -rw-rwx--- 1 www-data 1000 102 Oct 23 13:30 .env
      -rw-rwx--- 1 www-data 1000 746 Oct 19 06:36 .env.example
      -rw-rwx--- 1 www-data 1000 3858 Oct 23 13:36 .gitattributes
      -rw-rwx--- 1 www-data 1000 492 Oct 19 06:36 .gitignore
      -rw-rwx--- 1 www-data 1000 0 Oct 23 13:15 .gitkeep
      -rw-rwx--- 1 www-data 1000 1875 Oct 19 06:36 .travis.yml
      -rw-rwx--- 1 www-data 1000 18046 Oct 19 06:36 LICENSE
      -rw-rwx--- 1 www-data 1000 6502 Oct 19 06:36 README.md
      -rw-rwx--- 1 www-data 1000 2299 Oct 19 06:36 composer.json
      -rw-rwx--- 1 www-data 1000 276423 Oct 23 13:36 composer.lock
      drwxrwx--- 4 www-data 1000 4096 Oct 19 06:36 drush
      -rw-rwx--- 1 www-data 1000 414 Oct 19 06:36 load.environment.php
      -rw-rwx--- 1 www-data 1000 481 Oct 19 06:36 phpunit.xml.dist
      drwxrwx--- 3 www-data 1000 4096 Oct 19 06:36 scripts
      drwxrws--- 50 www-data 1000 4096 Oct 24 01:48 vendor
      drwxrws--- 7 nginx 1000 4096 Oct 23 13:36 web









      share|improve this question













      I have two docker containers php and nginx. PHP runs its worker process as www-data and NGINX runs its worker process as nginx. I have following dir structure for my website. web is the docroot. 1000 is the admin/owner.



      -rw-rwx--- 1 www-data 1000 357 Oct 23 13:36 .editorconfig
      -rw-rwx--- 1 www-data 1000 102 Oct 23 13:30 .env
      -rw-rwx--- 1 www-data 1000 746 Oct 19 06:36 .env.example
      -rw-rwx--- 1 www-data 1000 3858 Oct 23 13:36 .gitattributes
      -rw-rwx--- 1 www-data 1000 492 Oct 19 06:36 .gitignore
      -rw-rwx--- 1 www-data 1000 0 Oct 23 13:15 .gitkeep
      -rw-rwx--- 1 www-data 1000 1875 Oct 19 06:36 .travis.yml
      -rw-rwx--- 1 www-data 1000 18046 Oct 19 06:36 LICENSE
      -rw-rwx--- 1 www-data 1000 6502 Oct 19 06:36 README.md
      -rw-rwx--- 1 www-data 1000 2299 Oct 19 06:36 composer.json
      -rw-rwx--- 1 www-data 1000 276423 Oct 23 13:36 composer.lock
      drwxrwx--- 4 www-data 1000 4096 Oct 19 06:36 drush
      -rw-rwx--- 1 www-data 1000 414 Oct 19 06:36 load.environment.php
      -rw-rwx--- 1 www-data 1000 481 Oct 19 06:36 phpunit.xml.dist
      drwxrwx--- 3 www-data 1000 4096 Oct 19 06:36 scripts
      drwxrws--- 50 www-data 1000 4096 Oct 24 01:48 vendor
      drwxrws--- 7 nginx 1000 4096 Oct 23 13:36 web






      permissions docker webserver drupal






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked 10 mins ago









      SkyRar

      14




      14

























          active

          oldest

          votes











          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',
          convertImagesToLinks: false,
          noModals: false,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: null,
          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%2funix.stackexchange.com%2fquestions%2f477389%2fis-it-okay-to-give-permission-of-rwx-to-my-php-user-outside-of-web-root%23new-answer', 'question_page');

          );

          Post as a guest



































          active

          oldest

          votes













          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes















           

          draft saved


          draft discarded















































           


          draft saved


          draft discarded














          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f477389%2fis-it-okay-to-give-permission-of-rwx-to-my-php-user-outside-of-web-root%23new-answer', 'question_page');

          );

          Post as a guest













































































          Popular posts from this blog

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

          Bahrain

          Postfix configuration issue with fips on centos 7; mailgun relay