Mitico Posted September 23, 2012 Share Posted September 23, 2012 (edited) Hello, Recently i uploaded a background image, added a few lines in general.css that were the following: background-image:url('../img/BG.png') ; background-repeat:no-repeat; background-size:cover; background-attachment:fixed; After that, i started to get an error on random pages at random times, the error looks like this: Warning: chmod() [function.chmod]: Operation not permitted in /home/myshop/domains/myshop.lt/public_html/classes/Tools.php on line 1655 The line mentioned is: chmod($cache_filename, 0777); So i'm guessing it's somehow related to caching. It doesn't have any impact on the site (yet), but still it sits there looking ugly. How can i fix this? Edited September 24, 2012 by Mitico (see edit history) Link to comment Share on other sites More sharing options...
tomerg3 Posted September 23, 2012 Share Posted September 23, 2012 Looks like the permissions or owner / group on your site are messed up. You should make sure that files that get executed from the browser run with the same owner / group as your FTP (you may have to ask your host for help with that). If that is set correctly, than Tools.php should have no problem creating a cache folder and placing files inside. 1 Link to comment Share on other sites More sharing options...
Mitico Posted September 24, 2012 Author Share Posted September 24, 2012 Thanks for your reply. Can there be any other problems other than permission mess up? By my estimation it all started when i added the background image, at first it was in .svg format, but now i changed it to .png. Can this modification be responsible for such an error? Link to comment Share on other sites More sharing options...
tomerg3 Posted September 24, 2012 Share Posted September 24, 2012 If you upload a file from the backoffice, and the server is poorly configured, Prestashop will no longer have permissions to change the file Link to comment Share on other sites More sharing options...
Mitico Posted September 24, 2012 Author Share Posted September 24, 2012 Ok, so i've changed file/folder permissions to 775 and so far the error is gone. Is it safe enough to leave such permissions? Somewhere on the net i've found recommendations to set folder permissions to 775 and file permissions to 644. Could you please shed some light on this matter? Link to comment Share on other sites More sharing options...
tomerg3 Posted September 24, 2012 Share Posted September 24, 2012 A proper server should be set as 755 for all folders, and should keep the same owner / group when uploading from the browser as when uploading from FTP. Link to comment Share on other sites More sharing options...
Mitico Posted September 24, 2012 Author Share Posted September 24, 2012 Thank you very much! I believe this problem is solved. Link to comment Share on other sites More sharing options...
Recommended Posts