Re: php as user apache

From: Date: Thu, 03 Jun 2004 20:25:53 +0000
Subject: Re: php as user apache
References: 1 2 3 4  Groups: php.general 
Request: Send a blank email to php-general+get-187576@lists.php.net to get a copy of this message
From: "Travis Low" <travis@dawnstar.com> > John W. Holmes wrote: > > From: "Nirnimesh" <nirnimesh@students.iiit.net> > > > >>I have a problem regarding using my php scripts to write files to my > >>account. > >>We know that php runs as user apache. Now giving write permissions to > >>apache for uploading files to my account essentially means that I have to > >>give write permissions for apache (i.e. o+w). Now, does that not mean that > >>any user which is can run php scripts can have access to my account? > > > > Yes (well, has access to that directory). > > > >>Is there any configuration setting that I'm missing. > > > > Safe mode, open_basedir, etc. > > Is there a way to cause PHP scripts to run as the user and group associated > with the apache virtual host? If you use PHP as a CGI, you can do this. I believe I've also heard that Apache2 has ways of doing this also (with PHP as a module), but I don't know the details. ---John Holmes...

« previous php.general (#187576) next »