Those scripts should be run as sudo -u www-data