Permission denied to write on live server

30 Views Asked by At

I have created a PHP script for my PHP ecommerce website , that whenever I run this script it replaces new sitemap inside sitemap.xml file. this script works great locally but when running this script on live server i got this error:

{warning: file_put_contents(../sitemap.xml): failed to open stream: Permission denied in /var/www/mywwebsite.com/sitemap-maker.php on line 45}

I tried to give full permission to my file sitemap.xml, also trying resolve it manually. is there someone can guide in this regard.

0

There are 0 best solutions below