sitemap owner battle between cron job and web server
« on: April 03, 2007, 08:06:52 AM »
I have a problem with creating the gzipped sitemap when I run sitemap generator from a cron job after running it via the web interface.  The error I get:

Warning: gzopen(/home/xxx/public_html/africadisc/sitemap.xml.gz) [function.gzopen]: failed to open stream: Permission denied in /home/cbloubud/public_html/africadisc/admin/xmlsmgen/pages/class.xml-creator.inc.php(2) : eval()'d code on line 117

led me to check the permissions of the gz file.  I last ran the program from the web interface and all worked OK.  But with that, the gz file is owned by "nobody" and has 644 permissions.  So now  when the cron job ran, it could not overwrite the file since it's running as my user account.  This sounds like some umask settings problem somewhere????  How to fix?

Thanks,
BaliDave

Re: sitemap owner battle between cron job and web server
« Reply #1 on: April 04, 2007, 11:28:33 PM »
Hello,

you should manually create empty
Warning: gzopen(/home/xxx/public_html/africadisc/sitemap.xml.gz file and set 0666 permissions to it.