Re: Weird behaviour with move_uploaded_file on CGI version of PHP.

From: Date: Thu, 24 May 2007 23:04:49 +0000
Subject: Re: Weird behaviour with move_uploaded_file on CGI version of PHP.
References: 1 2  Groups: php.general 
Request: Send a blank email to php-general+get-255593@lists.php.net to get a copy of this message
Richard Lynch wrote:
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.
Belay all of this! Problem is not in php - it's in suexec. Just installed Ruby on rails under fcgid and am having the same issue. :-( Thanks for your reply (which came in just as I was typing this). :-) Brett.

« previous php.general (#255593) next »