HTML Sitemap permissions set/changed
« on: August 23, 2019, 02:23:59 PM »
Running the generator works, for the most part, however, the HTML Sitemap file created has the permissions 666 and any attempt to open it gets 500 error.  Changing the permissions of the file to 644 resolves this issue.  Is there a way to keep it from changing the permissions or to have it set the correct permissions?
Re: HTML Sitemap permissions set/changed
« Reply #1 on: August 23, 2019, 02:40:56 PM »
Hello,

this cannot be changed, but you can add another command line after running sitemap generator that will change the file permissions as needed.
Re: HTML Sitemap permissions set/changed
« Reply #2 on: September 19, 2019, 10:23:33 PM »
I wrote a php file that is kicked off by another cron job after the generation, started by a cron job, completes.  Although cumbersome it does work.

It would not take much to add it to your runcrawl.php so that it was one of the last things it does.  It is only two lines and one of them is only to tell it what file.

Code: [Select]
$fn = '/home/usename/domain.com/sitemap.html'; chmod($fn, 0644);