Cache permission error

ThemeBurn SupportForumsOpenCart ThemesKiddos OpenCart ThemeCache permission error

This topic has been marked as not resolved.

Good afternoon,

I bought a Kiddos opencart template for my customer.
I’ve found one serious problem that I cannot solve. BurnEngine Control has an integrated cache. The cache generates auxiliary files that are stored in ./image/cache/tb. The problem is in the nom that they get permission (chmod) 0600. So read only by the owner. And that’s the problem. The website is not loaded correctly. If I modify the permissions attributes on 0644 manually, the page loads.

The question, then, is how to set up this module so that the cached auxiliary cache files have the same privilege as 0644.

Thank you in advance and the information, and I sincerely welcome you
Petr Dubský

August 28, 2018 at 5:08 pm #65250

Hi,

BurnEngine cache uses exactly the same semantics as the OpenCart cache. It doesn’t set a permission mode to the file, but uses the operating system default permission mode, which is 0600 in your case. You have either change the default permission mode of the newly created files to be 0644 or force it manually with patching the code.

To change it manually, open system\vendor\BurnEngine\library\Cache.php, find fclose($handle); and insert this code immediately after it:

        if (substr(sprintf('%o', fileperms($file)), -4) == '0600') {
            chmod($file, 0644);
        }

This code is not guaranteed to work, because of the chmod specifics- the mode can be changed only by user who owns the file. Test it and see if it works.

Regards,
ThemeBurn team

September 3, 2018 at 5:55 pm #65312
Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.