Koozali.org: home of the SME Server

PHP BaseDir Sandbox Disable Howto

Luke Drumm

PHP BaseDir Sandbox Disable Howto
« on: February 05, 2002, 08:00:00 AM »
Hi,

If you want to completely disable the default PHP sandbox feature introduced in SME 5.1.2, here's how to do it:

1. Type in the following commands:

mkdir -p /etc/e-smith/templates-custom/etc/httpd/conf/httpd.conf
cd /etc/e-smith/templates-custom/etc/httpd/conf/httpd.conf
cp /etc/e-smith/templates/etc/httpd/conf/httpd.conf/95Add* .
pico 95AddType00PHP2ibays

2. Look for the 'sandbox' section of the file and add hashes to the following lines:
#               my $basedir = db_get_prop(\%accounts, $key, 'PHPBaseDir') ||
#                   "/home/e-smith/files/ibays/$key";
#               $OUT .=
#                   "    php_admin_value open_basedir $basedir\n";

3. Type in the following commands:
/sbin/e-smith/expand-template /etc/httpd/conf/httpd.conf
service httpd restart

Enjoy.

Regards,
Luke

Luke Drumm

Re: PHP BaseDir Sandbox Disable Howto
« Reply #1 on: February 05, 2002, 08:29:54 AM »
Please note that this removes a layer of security from your system, thus think carefully before implimenting it.

Regards,
Luke

Steve L

Re: PHP BaseDir Sandbox Disable Howto
« Reply #2 on: February 18, 2002, 11:45:57 PM »
Luke,

I applied the PHP BaseDir Sandbox Disable Howto, which works great , thank you.

However I can no longer access the web manager.

What is the best way to return my system back to the state prior to the Howto.

Steve

Luke Drumm

Re: PHP BaseDir Sandbox Disable Howto
« Reply #3 on: February 24, 2002, 11:24:42 PM »
If you're referring to the e-smith server manager than I'm rather curious as it doesn't utilse PHP (ASAIK).

Anyway... to reverse the effect simply do the following:

cd /etc/e-smith/templates-custom/etc/httpd/conf/httpd.conf
rm 95AddType00PHP2ibays
/sbin/e-smith/expand-template /etc/httpd/conf/httpd.conf
service httpd restart


Regards,
Luke

Steve L

Re: PHP BaseDir Sandbox Disable Howto
« Reply #4 on: February 25, 2002, 01:22:02 AM »
Luke,

I was to blame for the problems I experienced. I somehow screwed up the syntax.

I have your how to working great now, thank you.

Audrius

Re: PHP BaseDir Sandbox Disable Howto - problems
« Reply #5 on: February 28, 2002, 01:01:00 PM »
Steve L wrote:
>
> Luke,
>
> I was to blame for the problems I experienced. I somehow
> screwed up the syntax.
>
> I have your how to working great now, thank you.

Hi,

where you find mistake? Because I do follow this howto and now I cannot get to "server-manager" page...

Please, help!!!

AV

Steve L

Re: PHP BaseDir Sandbox Disable Howto - problems
« Reply #6 on: February 28, 2002, 06:01:04 PM »
Audrius,

If you have not rebooted, do so. If that does not help, I think Luke Drumm posted how to remove the Sandbox changes a few threads before this.

Audrius

Re: PHP BaseDir Sandbox Disable Howto - problems
« Reply #7 on: February 28, 2002, 10:46:31 PM »
Steve L wrote:
>
> Audrius,
>
> If you have not rebooted, do so. If that does not help, I
> think Luke Drumm posted how to remove the Sandbox changes a
> few threads before this.

Thanks Steve. Yea, I have test server so I do most of experiment on that box. But when I read Luke post it was so clear that I did it with production server and tadaaa - problems. But I went to my test box do the same and rebooted - that solved problem. So sorry to trouble anyone.

Audrius