Permissions on a folder stopping Nginx from starting

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











up vote
1
down vote

favorite












I am fairly new to Linux. I have a couple of websites that I want to host on my CentOS 7 VPS with Nginx.



Nginx ought to start on start up, but it is failing due to some permissions issue, I know what file has the issue, but I don't know what the permissions should be in order to make Nginx happy.



I've captured what is happening in a screencast.



What am I missing? As you can see from the screencast, nginx:nginx is the set user and group for all the files within the site's directory.



I assume I do not need a www-data user and group, because Nginx has its own user and group (nginx:nginx)?







share|improve this question

























    up vote
    1
    down vote

    favorite












    I am fairly new to Linux. I have a couple of websites that I want to host on my CentOS 7 VPS with Nginx.



    Nginx ought to start on start up, but it is failing due to some permissions issue, I know what file has the issue, but I don't know what the permissions should be in order to make Nginx happy.



    I've captured what is happening in a screencast.



    What am I missing? As you can see from the screencast, nginx:nginx is the set user and group for all the files within the site's directory.



    I assume I do not need a www-data user and group, because Nginx has its own user and group (nginx:nginx)?







    share|improve this question























      up vote
      1
      down vote

      favorite









      up vote
      1
      down vote

      favorite











      I am fairly new to Linux. I have a couple of websites that I want to host on my CentOS 7 VPS with Nginx.



      Nginx ought to start on start up, but it is failing due to some permissions issue, I know what file has the issue, but I don't know what the permissions should be in order to make Nginx happy.



      I've captured what is happening in a screencast.



      What am I missing? As you can see from the screencast, nginx:nginx is the set user and group for all the files within the site's directory.



      I assume I do not need a www-data user and group, because Nginx has its own user and group (nginx:nginx)?







      share|improve this question













      I am fairly new to Linux. I have a couple of websites that I want to host on my CentOS 7 VPS with Nginx.



      Nginx ought to start on start up, but it is failing due to some permissions issue, I know what file has the issue, but I don't know what the permissions should be in order to make Nginx happy.



      I've captured what is happening in a screencast.



      What am I missing? As you can see from the screencast, nginx:nginx is the set user and group for all the files within the site's directory.



      I assume I do not need a www-data user and group, because Nginx has its own user and group (nginx:nginx)?









      share|improve this question












      share|improve this question




      share|improve this question








      edited Apr 29 at 10:17









      sebasth

      5,81121640




      5,81121640









      asked Apr 27 at 7:43









      Ciwan

      1216




      1216




















          1 Answer
          1






          active

          oldest

          votes

















          up vote
          1
          down vote



          accepted










          CentOS uses SELinux to confine http server. When you use non-default configuration (log files in non-typical locations, enable server side scripting, etc.) you likely need to tune SELinux policy.



          SELinux logs policy access denials in audit log (/var/log/audit/audit.log) and default tools for suggestions and policy generation include audit2why and audit2allow.



          Usual steps for solving SELinux permission issues include tuning policy booleans or(/and) add and apply file labeling rules.
          I've explained the topic more generally and in detail for question:
          Configure SELinux to allow daemons to use files in non-default locations
          .



          I recommend checking what audit2allow suggests. Your issue might be solved by enabling a boolean policy option. If boolean tuning isn't enough, you need to add file labeling rules. For right file contexts consult httpd_selinux man page.






          share|improve this answer





















            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%2f440356%2fpermissions-on-a-folder-stopping-nginx-from-starting%23new-answer', 'question_page');

            );

            Post as a guest






























            1 Answer
            1






            active

            oldest

            votes








            1 Answer
            1






            active

            oldest

            votes









            active

            oldest

            votes






            active

            oldest

            votes








            up vote
            1
            down vote



            accepted










            CentOS uses SELinux to confine http server. When you use non-default configuration (log files in non-typical locations, enable server side scripting, etc.) you likely need to tune SELinux policy.



            SELinux logs policy access denials in audit log (/var/log/audit/audit.log) and default tools for suggestions and policy generation include audit2why and audit2allow.



            Usual steps for solving SELinux permission issues include tuning policy booleans or(/and) add and apply file labeling rules.
            I've explained the topic more generally and in detail for question:
            Configure SELinux to allow daemons to use files in non-default locations
            .



            I recommend checking what audit2allow suggests. Your issue might be solved by enabling a boolean policy option. If boolean tuning isn't enough, you need to add file labeling rules. For right file contexts consult httpd_selinux man page.






            share|improve this answer

























              up vote
              1
              down vote



              accepted










              CentOS uses SELinux to confine http server. When you use non-default configuration (log files in non-typical locations, enable server side scripting, etc.) you likely need to tune SELinux policy.



              SELinux logs policy access denials in audit log (/var/log/audit/audit.log) and default tools for suggestions and policy generation include audit2why and audit2allow.



              Usual steps for solving SELinux permission issues include tuning policy booleans or(/and) add and apply file labeling rules.
              I've explained the topic more generally and in detail for question:
              Configure SELinux to allow daemons to use files in non-default locations
              .



              I recommend checking what audit2allow suggests. Your issue might be solved by enabling a boolean policy option. If boolean tuning isn't enough, you need to add file labeling rules. For right file contexts consult httpd_selinux man page.






              share|improve this answer























                up vote
                1
                down vote



                accepted







                up vote
                1
                down vote



                accepted






                CentOS uses SELinux to confine http server. When you use non-default configuration (log files in non-typical locations, enable server side scripting, etc.) you likely need to tune SELinux policy.



                SELinux logs policy access denials in audit log (/var/log/audit/audit.log) and default tools for suggestions and policy generation include audit2why and audit2allow.



                Usual steps for solving SELinux permission issues include tuning policy booleans or(/and) add and apply file labeling rules.
                I've explained the topic more generally and in detail for question:
                Configure SELinux to allow daemons to use files in non-default locations
                .



                I recommend checking what audit2allow suggests. Your issue might be solved by enabling a boolean policy option. If boolean tuning isn't enough, you need to add file labeling rules. For right file contexts consult httpd_selinux man page.






                share|improve this answer













                CentOS uses SELinux to confine http server. When you use non-default configuration (log files in non-typical locations, enable server side scripting, etc.) you likely need to tune SELinux policy.



                SELinux logs policy access denials in audit log (/var/log/audit/audit.log) and default tools for suggestions and policy generation include audit2why and audit2allow.



                Usual steps for solving SELinux permission issues include tuning policy booleans or(/and) add and apply file labeling rules.
                I've explained the topic more generally and in detail for question:
                Configure SELinux to allow daemons to use files in non-default locations
                .



                I recommend checking what audit2allow suggests. Your issue might be solved by enabling a boolean policy option. If boolean tuning isn't enough, you need to add file labeling rules. For right file contexts consult httpd_selinux man page.







                share|improve this answer













                share|improve this answer



                share|improve this answer











                answered Apr 29 at 10:16









                sebasth

                5,81121640




                5,81121640






















                     

                    draft saved


                    draft discarded


























                     


                    draft saved


                    draft discarded














                    StackExchange.ready(
                    function ()
                    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f440356%2fpermissions-on-a-folder-stopping-nginx-from-starting%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