Jump to content

[SOLVED] chmod error


Recommended Posts

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 by Mitico (see edit history)
Link to comment
Share on other sites

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.

  • Like 1
Link to comment
Share on other sites

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

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

×
×
  • Create New...