Boost uses mkdir() with the $recursive flag set to TRUE, which allows to create new directory along with all its needed parents if they do not exists.

After, Boost calls drupal_chmod() on the directory, meaning the deepest one. So it is likely that parents directories won't have the proper permission, leading to a fail of the drupal_chmod() on that very deepest directory. Example:

The URL you request is something like: foo.com/bar/zoo/dummy/path

Boost might create a path like: cache/normal/foo.com/bar/zoo/dummy

Then Boost will try to chmod: cache/normal/foo.com/bar/zoo/dummy

Which might fail because it forgot to chmod those first:

cache
cache/normal
cache/normal/foo.com
cache/normal/foo.com/bar
cache/normal/foo.com/bar/zoo

The problem with this, is that depending on your filesystem configuration, Boost might not be able to clear the cache directory ; leaving expired HTML files in the cache directory.

Patch following.

Cheers

CommentFileSizeAuthor
#1 chmod-recusively-2059191-1.patch772 bytesjchatard
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

jchatard’s picture

Status: Active » Needs review
FileSize
772 bytes

Here's a patch for this!

jorges’s picture

Issue summary: View changes

Confirming the problem. Because of the wrong permissions, some directories were created with 0755 permissions. Thus, they could not get deleted with drush cc all on the command line (since drush runs under another linux user than www-data).

The patch in #1 solved the problem for me.