Index: [Article Count Order] [Thread]

Date:  Tue, 13 Jun 2006 13:33:04 -0700
From:  "Ken Marcus - Precision Web Hosting, Inc." <kenmarcus (at mark) precisionweb.net>
Subject:  [coba-e:05707] Re: php open_basedir restrictions
To:  <coba-e (at mark) bluequartz.org>
Message-Id:  <290b01c68f28$983c24a0$6500a8c0@OfficeKen>
References:  <00bd01c68f1a$ccf0e9a0$6401a8c0@acerbaby>
X-Mail-Count: 05707

From: "Florian Arzberger"

> has anyone ever thought of implementing php open_basedir restrictions by
> default on bq? like restricting write access to the current vsite and /tmp
> only? i wouldn't see any downsides there, and it could still easily be
> removed for certain sites if necessary.
>

I do that in my perl install script.

$ls=`ls -la /home/sites | grep $hostname.$domainname`;
($prev0, $prev1, $prev2, $prev3, $prev4, $prev5) = split(/\//,$ls);
chomp ($prev3);
$location = "$prev2/$prev3";
$sitenumber = $prev3;

$thefile = "/etc/httpd/conf/vhosts/$sitenumber".".include";
system ("echo 'Alias /hosted-by /home/sites/home/web/hosted-by' >> 
$thefile");
system ("echo 'php_admin_value open_basedir 
/home/.sites/$location/web:/home/tmp' >> $thefile");
print "I echoed the hosted-by and phpadmin_value  to $thefile\n";


Normally it does not cause a problem.


----
Ken Marcus
Precision Web Hosting, Inc.
http://www.precisionweb.net