I have just moved some sites from a shared host (Site5) to a VPS (Servint). I have not made any changes to the configuration of the software running the site. In the past, I would upload a picture through my site (Image Gallery Module) and it would be created under my user name. Now it is created as user nobody (apache user name). Site5 was running php as fast-cgi and so is my current VPS setup. I have asked Servint how to change the settings so files are generated under the username. Apparently there is no way: I was wondering if there is a way after all or if its true what they are telling me and I have to execute phpsuexec. Then how did my files end up having the correct username under Site5?
Thats besides the point, because I need to do this as root. Thats what I have been doing anyways, its just a bit of a pain.
They are right, the correct way of doing that is using PHPSuexec. However there is some trick you could do. If you set the bit "s" to a folder, each file created inside it will have the ownership of the folder, this would be the way: chmod 2755 folder then when you do ls -lha it should look like this: drwxr-sr-x 2 user user 4,0K 2007-05-11 04:49 folder