My default cpanel set up runs apache as user "nobody". So when I run a php script via a browser that outputs a file, that file has ownership nobody:nobody. When I run the script from a cron job logged in as user "fred", the output files are owned by fred:fred I need both browser and cron to overwrite the same file. The issue I have is that if one "user" creates the file, the other one can't overwrite it. Please can you let me know where the fundamental problem is and a possible solution. Permissions on the files are 0775.
- Do I need to set up groups - adding the user to the same group as nobody? If so how?
- How do I get the cron job to run as user nobody?
Many thanks, Lloyd