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

    I’ve set up a test copy of an existing site on a server entirely separate from the original site, which is for a client to practice on. All seems to be working ok apart from saving changes.

    At the admin site home page i get the warning that ’cache directory not writable’ . I’ve tried a few different settings for the cache directory and currently have this set at 755, but am still getting no joy. When i try to save and refresh any changes i get these errors in the preview window:

    Warning: unlink(/home/httpd/vhosts/xyz.co.uk/subdomains/abcd/httpdocs/assets/cache/docid_15.pageCache.php): Permission denied in /home/httpd/vhosts/xyz.co.uk/subdomains/abcd/httpdocs/manager/processors/cache_sync.class.processor.php on line 59

    Warning: unlink(/home/httpd/vhosts/xyz.co.uk/subdomains/abcd/httpdocs/assets/cache/docid_17.pageCache.php): Permission denied in /home/httpd/vhosts/xyz.co.uk/subdomains/abcd/httpdocs/manager/processors/cache_sync.class.processor.php on line 59

    Warning: unlink(/home/httpd/vhosts/xyz.co.uk/subdomains/abcd/httpdocs/assets/cache/docid_18.pageCache.php): Permission denied in /home/httpd/vhosts/xyz.co.uk/subdomains/abcd/httpdocs/manager/processors/cache_sync.class.processor.php on line 59

    Warning: unlink(/home/httpd/vhosts/xyz.co.uk/subdomains/abcd/httpdocs/assets/cache/docid_32.pageCache.php): Permission denied in /home/httpd/vhosts/xyz.co.uk/subdomains/abcd/httpdocs/manager/processors/cache_sync.class.processor.php on line 59

    Warning: fopen(../assets/cache/siteCache.idx.php): failed to open stream: Permission denied in /home/httpd/vhosts/xyz.co.uk/subdomains/abcd/httpdocs/manager/processors/cache_sync.class.processor.php on line 215
    Cannot open file (../assets/cache/siteCache.idx.php)

    (i’ve replaced the actual url and subdomain with ’xyz.co.uk’ and ’abcd’)

    ----------------------------------------------------------------

    Can somebody let me know what the cache directory should be set to so that i can save changes - or if indeed this is the only problem???

    thanks in advance
      • 25663 MODX Staff
      • 12,272 Posts
      If 755 doesn’t work, you’ll likely need to go to 777.
        Ryan Thrash, MODX Co-Founder
        Follow me on Twitter at @rthrash or catch my occasional unofficial thoughts at thrash.me
        • 25519
        • 265 Posts
        Thanks, worked fine.
        I applied 777 to both ’cache’ and ’manager/processors’ directories.

        the only reason i didn’t apply 777 before was possible security problems - do you think the cms is vulnerable now there is rwx applied to public directories???

        by the way, congratulations on the award!
          • 28042 ☆ A M B ☆
          • 24,524 Posts
          You don’t need 777 on the manager folders, just on a few of the assets folders; usually assets/images, assets/cache, and maybe assets/files if you are going to be uploading files for some reason.
            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
            • 25519
            • 265 Posts
            I reset manager/processors directory back to 755 and everything works
            thanks.