Force PHP CLI to write files as www-data – Apache
Is there a way to make PHP CLI-invoked scripts to fwrite() as www-data? Currently, if I create a text file and write to it using my own custom script php writeToLogFile.php, the file is created as root, and with very…