We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
  • Hi,

    I have installed version 2.5.7 on the Cloudways server but when I change the .htaccess file in the /core folder it still shows that the folder is insecure.

    Permission folder/Core: 755

    Any suggestion?

    .htaccess
    # deny access to _all_ files in the core, including changelog.txt and error.log
    # original borrowed from owncloud
    
    # line below if for Apache 2.4
    <ifModule mod_authz_core.c>
        Require all denied
    </ifModule>
    
    # line below if for Apache 2.2
    <ifModule !mod_authz_core.c>
        deny from all
        Satisfy All
    </ifModule>
    
    # section for Apache 2.2 and 2.4
    IndexIgnore *
    [ed. note: rocaoliveira last edited this post 6 years, 10 months ago.]
      • 3749
      • 24,544 Posts
      There's probably a way to make that work, but I always move the core above the web root. You just need to modify the core/config/config.inc.php file and the three config.core.php files (MODX Root, manager, and connectors folders).
        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
      • Hi, BobRay

        Then I would have to move the core/ folder out of my past root/ ?
          • 3749
          • 24,544 Posts
          Yes, though I usually rename it first and don't remove it until I'm sure everything is working as it should. I usually put it above public_html and name it something uninteresting.

          BTW, UpgradeMODX will still work if you do this, but when you back up the site, you have to remember to also back up the core folder separately.

            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
          • As I use Upgrade Modx, it may be a problem in the future, I find it strange that this inconsistency appears with the permissions being all correct and the .htaccess working perfectly.
              • 3749
              • 24,544 Posts
              Maybe you misunderstood me -- UpgradeMODX will work fine with a moved and renamed core (and a renamed manager folder). I use it all the time. smiley
                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
              • Got it!

                I modify
                core/config/config.inc.php

                and

                public_html/core/
                public_html/core/model/modx/processors/

                but no work!

                Occour error:
                manager/index.php
                lines: 37,38

                  • 3749
                  • 24,544 Posts
                  That doesn't sound quite correct, so let me try again.

                  First, you move the core.

                  Then, the *only* file in or under the core directory that needs to change is core/config/config.inc.php. Change all paths or URLs in config.core.php that need updating. If they are defined in terms of MODX_CORE_PATH, or are *not* under the core, they don't need changing, but if they are hard-coded paths, in or under the core directory, they need to be updated. Usually, it's just the MODX_CORE_PATH and sometimes the MODX_PROCESSORS_PATH that need updating.

                  Then, you need to modify the three *config.core.php* files.

                  One in the MODX Root directory
                  One in the manager folder
                  One in the connectors folder

                  They need to point to the new location of the core.

                    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
                  • Hi,

                    I will try to modify and give you a return, thanks for the feedback!
                    • Hi, BobRay

                      Unfortunately I did not succeed with your suggestion on the / CORE folder (I should not change the structure) even with the permissions set correctly still the public folder message continues.

                      Core folder is accessible by web