For whatever reason my cache folders have 775 permissions, but my files have 600. I am using suPHP and have seen that this is an issue that comes up on occasion and it usually results in a patch to the module:

+ // Set standard file permissions for webserver-generated files
+ @chmod($destination, 0664);

Do you think this is the case here as well?

CommentFileSizeAuthor
#2 boost-493764.patch900 bytesmikeytown2

Comments

mikeytown2’s picture

Put that into boost_cache_write()

Before

    else {
      // put the temp file in its final location
      if (@rename($tempfile, $filename) === FALSE) {
        watchdog('boost', 'Unable to rename file: %temp  to  %file<br /> Group ID: %gid<br /> User ID: %uid<br /> Current script owner: %user<br />', array('%temp' => $tempfile, '%file' => $filename, '%gid' => getmygid(), '%uid' => getmyuid(), '%user' => get_current_user()), WATCHDOG_WARNING);
        @unlink($tempfile);
        return FALSE;
      }
    }

After

    else {
      @chmod($tempfile, 0664);
      // put the temp file in its final location
      if (@rename($tempfile, $filename) === FALSE) {
        watchdog('boost', 'Unable to rename file: %temp  to  %file<br /> Group ID: %gid<br /> User ID: %uid<br /> Current script owner: %user<br />', array('%temp' => $tempfile, '%file' => $filename, '%gid' => getmygid(), '%uid' => getmyuid(), '%user' => get_current_user()), WATCHDOG_WARNING);
        @unlink($tempfile);
        return FALSE;
      }
    }

Is something like this what your proposing?

mikeytown2’s picture

Status: Active » Needs review
StatusFileSize
new900 bytes
doughold’s picture

Status: Needs review » Active

That looks like what I need, thanks! I will test it out tonight and let you know.

mikeytown2’s picture

Status: Active » Fixed

committed.

Please post if the above patch doesn't fix the issue.

doughold’s picture

That did the trick, thanks!

Status: Fixed » Closed (fixed)

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