Insure that script chgrp's the destination directories back to www-data, in case git or rsync changes it to something else.