httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Lewis Watson" <li...@visionsix.com>
Subject Re: Running phpscript with UID
Date Fri, 09 Aug 2002 15:10:29 GMT
> On Fri, Aug 09, 2002 at 04:22:19PM +0200, Daniel Nolte wrote:
> > I want that phpscript get executed with the userid
> > of the owner of the file or if that's easier with the uid I define
> > in "VirutalHost". I tried suexec, but suexec needs for every
> > user an own php-binary, since it checks who owns this binary.
> > Is there a better/easier way?
>

Hi Daniel,
Another option is to compile php as a cgi binary --  and then using it as
you would with any other cgi-script. Then, with suexec enabled, you could
run php scripts under the users uid via suexec. It has to be ran as either a
cgi-script or server-include for suexec to work. Some of the downsides to
this is the shebang is required at the top just as you would with any other
scripting language #!/usr/local/bin/php and you would have to meet all of
suexec's requirements to make it work. Consider php safe mode and other
security options when using php as a cgi binary as found at
   http://www.php.net/manual/en/security.cgi-bin.php

I hope this helps.
Lewis Watson




---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Mime
View raw message