Anyone using the Php open_basedire tweek?

sexy_guy

Well-Known Member
Mar 19, 2003
847
0
166
php open_basedir Tweak
Php's open_basedir protection prevents users from opening files outside of their home directory with php.

Did anyone run this? If so, how is it running?

cPanel.net Support Ticket Number:
 

FWC

Well-Known Member
May 13, 2002
349
0
316
Ontario, Canada
I've played with it. And it works as advertised. So the vBulletin control panel throws an error trying to get at /proc/loadavg. And PhotoPost will break from not being able to get to /usr/local/bin/mogrify. I haven't had time yet, but I am going to edit /scripts/phpopenbasectl and add these paths and try it again.
 

www-lab

Well-Known Member
Feb 1, 2003
62
0
156
I'm using that feature and I requested it :)

cPanel.net Support Ticket Number:
 

raventec

Well-Known Member
Apr 19, 2003
116
0
166
So far so good here. No reports of problems. I do most of the php and cgi installs for most of my clients though, and I tend to select scripts that don't need to go wandering around outside of their directories ;)

cPanel.net Support Ticket Number:
 

CoolMike

Well-Known Member
Sep 6, 2001
313
0
316
I tried it as well, but disabled it again, because I'm using a SSL certificate which I call like this:

https://secure.servername.ch/~username

Unfortunately then I get the message, that I open a file which is outside my home directory. But this is not true at all...

I did not have enough time to test it out.

Mike

cPanel.net Support Ticket Number:
 

sexy_guy

Well-Known Member
Mar 19, 2003
847
0
166
Originally posted by CoolMike
I tried it as well, but disabled it again, because I'm using a SSL certificate which I call like this:

https://secure.servername.ch/~username

Unfortunately then I get the message, that I open a file which is outside my home directory. But this is not true at all...

I did not have enough time to test it out.

Mike

cPanel.net Support Ticket Number:
Ok, but i would have thought that you would have opened up httpd.conf and for that sites with the cert, commented out the open BD directives for that site.

cPanel.net Support Ticket Number:
 

qwerty

Well-Known Member
Jan 21, 2003
215
2
168
Will the open_basedir option in WHM automatically add the open_basedir config to all NEW accounts when they're setup in the future, or only the existing ones?

cPanel.net Support Ticket Number:
 

casey

Well-Known Member
Jan 17, 2003
2,288
0
191
Originally posted by qwerty
Will the open_basedir option in WHM automatically add the open_basedir config to all NEW accounts when they're setup in the future, or only the existing ones?

cPanel.net Support Ticket Number:
It will add it to all new accounts, too.

cPanel.net Support Ticket Number:
 

qwerty

Well-Known Member
Jan 21, 2003
215
2
168
ok thanks that's good to know. Just one last question .. why is it that the /tmp directory is added in open_basedir, why not /home/username/tmp since every user has a tmp dir on cpanel boxes anyway?

cPanel.net Support Ticket Number:
 

mmkassem

Well-Known Member
Oct 21, 2002
390
0
166
Egypt
Originally posted by qwerty
ok thanks that's good to know. Just one last question .. why is it that the /tmp directory is added in open_basedir, why not /home/username/tmp since every user has a tmp dir on cpanel boxes anyway?

cPanel.net Support Ticket Number:
tmp inside the user dir is not used for saving temp files generated through Apache

But /tmp is used for sessions, attachments and many others stuff.

cPanel.net Support Ticket Number:
 

thrax

Registered
Dec 23, 2003
1
0
151
issues with photopost and cpanel

I have read through here and it sounds like a solution was come accross for the problem can someone let me know what it is as I am haveing hte same issue.

Thanks in advance

Jay

Warning: chdir(): No such file or directory (errno 2) in /usr/home/users/localrid/public_html/photopost/header-inc.php on line 12

Warning: main(mainfile.php): failed to open stream: No such file or directory in /usr/home/users/localrid/public_html/photopost/header-inc.php on line 13

Fatal error: main(): Failed opening required 'mainfile.php' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /usr/home/users/localrid/public_html/photopost/header-inc.php on line 13
 

McRox

Member
Nov 20, 2002
5
0
151
NL
Re: issues with photopost and cpanel

Originally posted by CoolMike
I tried it as well, but disabled it again, because I'm using a SSL certificate which I call like this:

https://secure.servername.ch/~username

Unfortunately then I get the message, that I open a file which is outside my home directory. But this is not true at all...

I did not have enough time to test it out.

Mike

cPanel.net Support Ticket Number:
Disabling openbase_dir for the domain "secure.servername.ch" might help I think. (Not sure if that fixed it for moduserdir or openbasedir)