Urb LeJeune wrote: > I have a multipart form for uploading graphics and documents. > It works fine. However, the ownership of the uploaded file - on a Linux > box - is set to apache:apache. I need the ownership to be > user-name:apache. An executing script, not running as root, cannot > change the ownership. > > Is the ownership of a created file a configurable option?
I'm not aware of any .ini value to specify the ownership details for uploaded files. Is there a particular reason that you need this ownership setup? One potential solution would be to add a restricted sudoers entry for apache which would allow it to execute chown to a specific user only under a specified directory. Something like: apache ALL = (root) NOPASSWD: /bin/chown user-name /var/www/* might do the trick, allowing you to use: exec('/usr/bin/sudo /bin/chown user-name '. escapeshellarg($pathname),$output,$retval); Good luck! Dan _______________________________________________ New York PHP Community Talk Mailing List http://lists.nyphp.org/mailman/listinfo/talk NYPHPCon 2006 Presentations Online http://www.nyphpcon.com Show Your Participation in New York PHP http://www.nyphp.org/show_participation.php