We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 29934
    • 11 Posts
    Hi,
    We have a dev version of a client’s website, and we sent a zipped version for them to install on their server.
    They are asking the following question, wich I can’t answer so I’m calling for someone’s sagacity...

    "I followed your installation process, and got this error when cleaning cache :

    Warning: fopen(../assets/cache/siteCache.idx.php) [function.fopen]: failed to open stream: Permission denied in /home/sites_web/public.clientdomainname.net/html/modx/manager/processors/cache_sync.class.processor.php on line 228
    Cannot open file (../assets/cache/siteCache.idx.php)

    We forbid php (web server) from writing code into website directory that could be executed by server itself. This is just a very basic security precaution. Why is application trying to modify php code?"


    Any idea ?
    thx
    Tib
      • 37550 ☆ A M B ☆
      • 711 Posts
      MODx is trying to create cache pages of the site and uses these files / directory to do so.

      assets/cache/ needs to be writeable by php.
        http://www.onesmarthost.co.uk
        UK MODX Hosting with love.
        • 29934
        • 11 Posts
        Sure, I understand that, but why is the client thinking this is not secure ?
          • 22303 MODX Staff
          • 10,725 Posts
          Quote from: tibor at Mar 04, 2010, 06:20 PM

          Sure, I understand that, but why is the client thinking this is not secure ?
          They have been incorrectly educated?
            • 29934
            • 11 Posts
            Well maybe. Apparently their concern is that PHP can write something and then execute it : here’s what they say " We forbid apache/php process to write files that it could execute. Therefore with this policy ../assets/cache/siteCache.idx.php should not be writable by modx scripts. In which situations should we clean the cache? And can this be done “offline”?"
            Frankly speaking we don’t know what to respond. We explained that caching is necessary for the system. This client is hosting his own client’s data on the server, so they are extremely concerned with security. They believe the cache system could be used by hackers. What could we answer ?
            thanks
            T
              • 37550 ☆ A M B ☆
              • 711 Posts
              It sounds like the host does not have much experience with a PHP Setup, there is nothing unsecure with allowing PHP to write to your domain folder, providing the server / FTP Login is secure and register globals is switched off a hacker could not compromise your files or create new ones on your server.

              Aaron
                http://www.onesmarthost.co.uk
                UK MODX Hosting with love.
                • 28042 ☆ A M B ☆
                • 24,524 Posts
                If this is such a serious concern to them, then they should be running PHP in some kind of suexec mode. In this way, when a script is run the user is switched from the apache user to the owner of the script (which would be the same user as your FTP user). This way nothing has to be world-writable, only owner-writable.

                  Studying MODX in the desert - http://sottwell.com
                  Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
                  Join the Slack Community - http://modx.org
                  • 29934
                  • 11 Posts
                  Thanks for the idea. Do any of these guidelines for CMSMadeSimple apply ? http://bit.ly/9elt9E
                  t