
8th February 2006, 14:59
|
|
Junior Member
|
|
Join Date: Nov 2005
Posts: 25
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
PHP SafeMode and open_basemap
Hi,
Hope this wasn't here earlier...
Her it comes, when enabling safeMode in ISP config both the safemode and the open_basedir flags are set. Well good of course but not very finegraded. A real life situation could be a php site using ImageMagick via systemcalls. This would be deffered throu the safeModeFlag. Switching SafeMode off in ispconfig helps, but than then openBasedir flag is unset too leaving a potential risky situation. Wouldnt it be an idea to switch those parameters independently?
|

8th February 2006, 17:15
|
|
Super Moderator
|
|
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 31,853
Thanks: 781
Thanked 1,558 Times in 1,477 Posts
|
|
Do you have a detailed example where you would need this?
|

8th February 2006, 17:36
|
|
Junior Member
|
|
Join Date: Nov 2005
Posts: 25
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Quote:
|
using ImageMagick via systemcalls.
|
I've clients where imageMagick is used for image handling (better than gd) which are called form php with the system call. with safemode all system calls are disabled. This could be tuned by the execdir flag but i dont know if this would be very compatible with all the different linuxes.
The open_basedir flag operates on its own, so using this security feature does not reley on safemode. In my view the open_basedir should always be set on a shared server. If the safemode would be operated seperatly in isp config on could allow system calls (safemode off) but still limit the scope of php to the open basdir settings. See also the numerous posts on cms and other software pacjages where the safemode has to be set off. In most of them even with safe mode off there could be extra security with the beasedir setting in effect.
Now ispconfig toggles both at the same time, so you get safemode with openbasedir or no safemode with no openbasedir.
hope thats enough to make my case?
|

8th February 2006, 23:44
|
|
Super Moderator
|
|
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 31,853
Thanks: 781
Thanked 1,558 Times in 1,477 Posts
|
|
Ok, let me check this...
|

9th February 2006, 10:35
|
|
Junior Member
|
|
Join Date: Nov 2005
Posts: 25
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Thanks!
and now i have to think up some text to fill the reply
|

19th February 2007, 12:30
|
|
Junior Member
|
|
Join Date: Feb 2007
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Quote:
|
Originally Posted by falko
Ok, let me check this...
|
I would also like open_basedir etc. to be separate from the "Safe Mode" checkbox.
An alternative way would of course be to check "Safe Mode" (to get open_basedir), and then to put "php_admin_flag safe_mode Off" into Apache Directives. This doesn't work, however, because the Apache Directives stuff gets inserted above the safe mode stuff in Vhosts_ispconfig.conf. Is there a reason for this?
|

20th February 2007, 17:51
|
|
Super Moderator
|
|
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 31,853
Thanks: 781
Thanked 1,558 Times in 1,477 Posts
|
|
You could modify the vhosts.conf master template in /root/ispconfig/isp/conf and move the Apache Directives placeholder below the other directives.
|

21st February 2007, 12:16
|
|
Senior Member
|
|
Join Date: Apr 2006
Location: Sydney
Posts: 236
Thanks: 0
Thanked 6 Times in 6 Posts
|
|
I suggest to just do what I do and patch /root/ispconfig/scripts/lib/config.lib.php
$php .= "\nphp_admin_flag safe_mode On
to
$php .= "\nphp_admin_flag safe_mode Off
And leave safemode On in each Vhost. Safemode will be off really but all the other nice options are On. this also fixes problems with things like Joomla etc (unless you use 1.5) and other uploaded file problems.
|
|
The Following User Says Thank You to djtremors For This Useful Post:
|
SupuS (9th September 2008)
|
| Thread Tools |
|
|
| Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT +2. The time now is 14:33.
|
Recent comments
56 min 29 sec ago
6 hours 44 min ago
8 hours 36 min ago
10 hours 20 min ago
14 hours 11 min ago
19 hours 56 min ago
20 hours 7 min ago
1 day 25 min ago
1 day 6 hours ago
1 day 11 hours ago