2

I've been stumped on this one for awhile and tried everything. When I click Clear Caches in settings, it appears as if everything works fine but when I check the logs I see...

2015/11/04 17:10:16 [error] [application] Tried to read the folder contents of path/cms/craft/storage/runtime/cache/, but could not. 2015/11/04 17:10:16 [error] [application] Tried to read the folder contents of path/cms/craft/storage/runtime/assets/, but could not. 2015/11/04 17:10:16 [error] [application] Tried to read the folder contents of path/cms/craft/storage/runtime/temp/, but could not.

I ommited the actual path because it contained a clients name but I checked it's accuracy. I also noticed that it appears to be writing files to the cache folder. I also verified permissions on the folders and parent folder, all are set at 777 (for testing) was set at 744. I'm not sure what else to try or do. Thanks!

2

How are you setting permissions? Command prompt? (S)FTP? What user does php run under? Make sure there are no open_basedir restrictions as well.

You can find out the user that php runs under as well as a bunch of other details right inside Craft: http://server/admin/utils/phpinfo and look for user/group and open_basedir.

Make sure you're giving the storage directory recursive permission as well. I would delete everything under /storage manually...

cd /path/cms/craft/storage/ && rm -r * && chmod -R 777 . 

... and then let Craft/php recreate the folders underneath.

| improve this answer | |
  • Thanks for the help @RitterKnight. I'm setting permissions on those folders via command line, using chmod. It's probably of note that this issue is happening locally. I checked the user info via phpinfo and it's showing my computer name. USER thompsong. I also looked for open_basedir and it says no value . I deleted everything like you instructed. Now it just throws the error for the cache folder and said the other two don't exist (obvious I guess). Lastly, if I monitor the cache folder, it appears it is deleting stuff, but still throwing the error. – Greg Thompson Nov 5 '15 at 15:11
  • When you say locally do you mean something like MAMP? It'll default to htdocs in the Applications folder which is a pain for permissions. I'd change that to something in your own home folder. Then you won't have to worry about permissions since the web server will be your username. – RitterKnight Nov 5 '15 at 16:36
  • If that's not the case, somewhere along the line the permissions got screwy so you may have to grant permission all the way at the top, starting at /path/. Do a sudo chown -R thompsong:thompsong /path/. That'll make sure you own everything down the path. – RitterKnight Nov 5 '15 at 16:37
  • I run the project with php -S localhost:4000. I'll try and change owners and get back to you. Thanks! – Greg Thompson Nov 5 '15 at 16:47
  • Ah yes, the built-in server. Never tried running Craft that way so I don't know if it's even possible. I think some people have had luck with it but I'd recommend running your dev stack as close as possible to what the production environment is. – RitterKnight Nov 5 '15 at 16:51

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.