I have a php script that needs to create a file in the file system. I use fopen etc... This appears to work fine. The only problem is all the files are created using the "web" user because this is what apache is running as.
Is there a way to have apache run as the user for each of my virtual domains. I DO specify the User directive for each virtual domain and I also start apache as root. However, it appears php scripts are always run by the "web" user. Thus, any files created by the script are owned by web.
I would appreciate any suggestions anyone has!
Thanks!