Originally Posted by
astarmathsandphysics
I will execute as root and have written another cron job to change owbership of all files in /var/www to www-data:www-data once a week.
Once is not enough because the script generates more files periodically and these are owned by root.
I was speaking more about writing a "wrapper" script that invokes the Google map generator and then changes the ownership. Something like this:
Code:
#!/bin/bash
MAP=/path/to/the/map.xml
chown root:root $MAP
chmod 600 $MAP
/usr/bin/google-sitemapgen --config=/usr/share/doc/google-sitemapgen/examples/astarmathsandphysics.xml
chown www-data:www-data $MAP
chmod 444 $MAP
Bookmarks