Re: Files created by PHP/Apache
| From: | CPT John W. Holmes | Date: | Wed, 30 Jul 2003 15:07:39 +0000 |
| Subject: | Re: Files created by PHP/Apache | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-157529@lists.php.net to get a copy of this message | ||
> I've got a problem with preconfigured server (Apache 1.3/MySQL 3/PHP 4):
>
> Files and directories created by a PHP script are always owned by the
apache
> user and apache group. But the script itself is inside of a virtualhost
> which has another user and group (web2 / ftponly)!
>
> So in fact the script has to run with the rights of the user web2??
Perhaps
> it does, but files/dirs are create with owner apache.
PHP runs as a module inside of apache, so any files it creates are owned by
the Apache user. That's the way it works.
If you run PHP as a CGI, this does not happen. Or use FTP to make files.
---John Holmes...