File uploaded via php assigned to "nobody" user. Solution ?
Hi.How VPS owner resolve this problem ? As you know, if in one of the sites hosted by the VPS a file is uploaded using a php script ( i.e. avatar upload in forum, browser filemanager in CMS, and so on ) this file is assigned to the Apache user, usually "nobody" or "web".
Googling a lot i find this solutions:
1) Using suphp or phpsuexec. Drawback: some problems with some scripts, user cannot use 777, and, veri important, needing of hardware resource ( php run as CGI )
2) Set cron to make a daily chown to restablish the right owner for each virtual server ( website/domain ).
Do you know Other solutions ?
May be settings some parameter in each virtual host declaration in the apache2.conf ( or httpd.conf ) ?