I am getting a lot of error messages in my logs and when I use drush to clear cache. A sample message is:

Warning: fopen(/home/mysite/tmp/filecache-default/cache-ctools_plugin_files:ctools:content_types) [function.fopen]: failed to open stream: Permission denied in DrupalFileCache->set() (line 134 of /home/mysite/public_html/sites/all/modules/filecache/filecache.inc).

There are dozens of these. I made sure the directory is writable on the web server so I am not sure what else might be wrong or what to do. Filecahce is writing files to the directory, I have confirmed that.

Update:
Just a little more info, I set /tmp/filecache-default to 777 and to the user "mysite". However, if I examine individual permissions of cached files within that directory, the permission is set to 644 and user: 99 on each file which I think is Apache. Hopefully that helps.

Comments

Danny Englander’s picture

Issue summary: View changes

typo

ogi’s picture

Component: Miscellaneous » Code
Category: support » bug
Status: Active » Fixed

Hopefully fixed in 00335f1. Added section about security considerations too.

Danny Englander’s picture

Hi, just updated to the latest dev and indeed that fixed this issue.

drush cc all no longer yields these errors and I don't see anything in the logs. I see that in my filecache-default folder, the files are now -rwxrwxrwx but this is above the webroot anyway so that should be fine.

Thank you!

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

Anonymous’s picture

Issue summary: View changes

more info