[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Changeroot for PHP?



On Tue, 22 Mar 2005 15:02:04 +0100
Norbert <norbert_schuetz@bigfoot.com> wrote:

> 
> Hi folks!
> 
> Although this is not really Debian-specific apart from 
> the fact that we run all servers with Debian:
> 
> Does anyone know a way to have PHP scripts run
> changerooted one namebased virtual servers (Apache)?
> 
> More specific: We have set up several domains with
> indiviual Apache virtual, namedbased configurations
> using the "User/Group" directives. The physical
> directory structure is something like
> /var/www/domain1/htdocs/
> /var/www/domain2/htdocs/
> /var/www/domain3/htdocs/
> 
> For security and other reasons we would like to have
> PHP scripts changerooted to /var/www/domain1/htdocs/.
> 
> We know this can be done using PHP-cgi and a sandbox
> but that introduces quite some performance penalties
> so we would prefer mod_php.

You might be interested in the open_basedir feature of php. (Note
that it does not require safe_mode, but can be used as part of
safe_mode.) You can read more about it at the following url:

http://www.php.net/features.safe-mode

HTH,
Jacob



Reply to: