We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 47586
    • 8 Posts
    After upgrading from 2.3.5 to 2.4.0 I received an error on my Dashboard:

    Core folder is accessible by web

    MODX detected that your core folder is (partially) accessible to the public. This is not recommended and a security risk. If your MODX installation is running on a Apache webserver you should at least set up the .htaccess file inside the core folder /home/admin/web/devaround.ru/public_html/core/. This can be easily done by renaming the existing ht.access example file there to .htaccess.

    There are other methods and webservers you may use, please read the Hardening MODX Guide for further information about securing your site.
    If you setup everything correctly, browsing e.g. to the Changelog should give you a 403 (permission denied) or better a 404 (not found). If you can see the changelog there in the browser, something is still wrong and you need to reconfigure or call an expert to solve this.

    I've renamed ht.access to .htaccess, my changelog url show me 404 error, but error still appear in Dashboard.

    Do you know what is the issue?

    Thanks.
      • 22840
      • 1,572 Posts
      Change the following to the .htaccess in the core folder

      From:
      IndexIgnore */*
      <Files *.php>
          Order Deny,Allow
          Deny from all
      </Files>


      To:
      IndexIgnore */*
      <Files *>
          Order Deny,Allow
          Deny from all
      </Files>
        • 47586
        • 8 Posts
        Quote from: paulp at Aug 27, 2015, 12:50 PM
        Change the following to the .htaccess in the core folder

        From:
        IndexIgnore */*
        <files *.php="">
            Order Deny,Allow
            Deny from all
        </files>


        To:
        IndexIgnore */*
        <files *="">
            Order Deny,Allow
            Deny from all
        </files>

        Changed, not work.
          • 22840
          • 1,572 Posts
          Where have the ="" come from, should be:

          IndexIgnore */*
          <files *>
              Order Deny,Allow
              Deny from all
          </files>
            • 47586
            • 8 Posts
            Quote from: paulp at Aug 27, 2015, 12:59 PM
            Where have the ="" come from, should be:

            IndexIgnore */*
            <files *>
                Order Deny,Allow
                Deny from all
            </files>

            It was issue with quote in forum, I used as you wrote above.
            Any other suggestions?
              • 3749
              • 24,544 Posts
              Honestly, your site will be much more secure if you move the core above the web root and modify the config.inc.php file and the config.core.php files (root, manager, connectors) to reflect the change. [ed. note: BobRay last edited this post 8 years, 7 months ago.]
                Did I help you? Buy me a beer
                Get my Book: MODX:The Official Guide
                MODX info for everyone: http://bobsguides.com/modx.html
                My MODX Extras
                Bob's Guides is now hosted at A2 MODX Hosting
                • 21395
                • 91 Posts
                Quote from: paulp at Aug 27, 2015, 12:50 PM
                Change the following to the .htaccess in the core folder

                From:
                IndexIgnore */*
                <files *.php="">
                    Order Deny,Allow
                    Deny from all
                </files>


                To:
                IndexIgnore */*
                <files *="">
                    Order Deny,Allow
                    Deny from all
                </files>


                This works. Confirmed in 2.4
                  MODX Revolution 2.6.5-pl (traditional)

                  Hosted on MODX Cloud

                  Skype: nicbaldeagle
                  • 31354
                  • 24 Posts
                  Quote from: nicboyde at Sep 01, 2015, 11:38 PM
                  Quote from: paulp at Aug 27, 2015, 12:50 PM
                  Change the following to the .htaccess in the core folder

                  From:
                  IndexIgnore */*
                  <files *.php="">
                      Order Deny,Allow
                      Deny from all
                  </files>


                  To:
                  IndexIgnore */*
                  <files *="">
                      Order Deny,Allow
                      Deny from all
                  </files>


                  This works. Confirmed in 2.4


                  This is not working for me on multiple sites upgrading to 2.4. My server is setup by default for no indexing, and it doesn't matter whether the file is named `.htaccess` or `ht.access` or whether the code is either of the above, when I click the link to the `http://www.mydomain.com/docs/changelog.txt` is still gets the 404 (Page Not Found), Error, yet MODX is still giving the "MODX detected that your core folder is (partially) accessible to the public."

                  Any other suggestions?
                    • 31354
                    • 24 Posts
                    Quote from: VDISP at Sep 03, 2015, 12:41 AM
                    Quote from: nicboyde at Sep 01, 2015, 11:38 PM
                    Quote from: paulp at Aug 27, 2015, 12:50 PM
                    Change the following to the .htaccess in the core folder

                    From:
                    IndexIgnore */*
                    <files *.php="">
                        Order Deny,Allow
                        Deny from all
                    </files>


                    To:
                    IndexIgnore */*
                    <files *="">
                        Order Deny,Allow
                        Deny from all
                    </files>


                    This works. Confirmed in 2.4


                    This is not working for me on multiple sites upgrading to 2.4. My server is setup by default for no indexing, and it doesn't matter whether the file is named `.htaccess` or `ht.access` or whether the code is either of the above, when I click the link to the `http://www.mydomain.com/docs/changelog.txt` is still gets the 404 (Page Not Found), Error, yet MODX is still giving the "MODX detected that your core folder is (partially) accessible to the public."

                    Any other suggestions?

                    Actually, I didn't catch the the difference in code by `Paulp (Reply #4)`

                    It should be:

                    From:
                    IndexIgnore */*
                    <files *.php>
                        Order Deny,Allow
                        Deny from all
                    </files>


                    To:
                    IndexIgnore */*
                    <files *>
                        Order Deny,Allow
                        Deny from all
                    </files>


                    with the file named `.htaccess` and the above code change, that seemes to have done the trick.
                      • 38314
                      • 45 Posts
                      Quote from: VDISP at Sep 03, 2015, 12:41 AM
                      Quote from: nicboyde at Sep 01, 2015, 11:38 PM
                      Quote from: paulp at Aug 27, 2015, 12:50 PM
                      Change the following to the .htaccess in the core folder

                      From:
                      IndexIgnore */*
                      <files *.php="">
                          Order Deny,Allow
                          Deny from all
                      </files>


                      To:
                      IndexIgnore */*
                      <files *="">
                          Order Deny,Allow
                          Deny from all
                      </files>


                      This works. Confirmed in 2.4


                      This is not working for me on multiple sites upgrading to 2.4. My server is setup by default for no indexing, and it doesn't matter whether the file is named `.htaccess` or `ht.access` or whether the code is either of the above, when I click the link to the `http://www.mydomain.com/docs/changelog.txt` is still gets the 404 (Page Not Found), Error, yet MODX is still giving the "MODX detected that your core folder is (partially) accessible to the public."

                      Any other suggestions?

                      Don't you have to visit http://www.mydomain.com/core/docs/changelog.txt instead of http://www.mydomain.com/docs/changelog.txt ?