Re: Weird behaviour with move_uploaded_file on CGI version of PHP.
| From: | Richard Lynch | Date: | Thu, 24 May 2007 22:10:38 +0000 |
| Subject: | Re: Weird behaviour with move_uploaded_file on CGI version of PHP. | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-255573@lists.php.net to get a copy of this message | ||
On Wed, May 23, 2007 3:36 pm, Brett Davidson wrote:
> Platform : FreeBSD 6.2 Release with Apache 2.0.59 running PHP 5.2.1_3
> CGI under SuExec in FastCGI mode.
>
> Issue: move_uploaded_file ALWAYS crfeates uploaded files with Unix
> permissions 600 (read and write for user only) regardless of
> ownership,
> directory or umask settings.
Regardless of all those settings in what context/environment?...
Are you using http://php.net/umask and/or chmod?
PHP runs in the environment you've defined in SuExec and FCGI. Which
I got NO IDEA how that all works, but presumably there are
configuration settings within those.
> This works fine with php installed as a module.
Well, yeah, as a Module you're in an entirely different
context/environment. That's kinda the whole POINT of SuExec in the
first place -- to change the user and their environment for the
execution of the script.
--
Some people have a "gift" link here.
Know what I want?
I want you to buy a CD from some indie artist.
http://cdbaby.com/browse/from/lynch
Yeah, I get a buck. So?