hosted by liquidweb


Go Back   Web Hosting Talk : Web Hosting Main Forums : Hosting Security and Technology : phpsuexec / php.ini overrides all security settings?
Reply

Hosting Security and Technology Configuring and optimizing web hosting servers and operating systems, developing administration scripts, building servers, protecting against hackers, and general security (SSL certificates, etc.)
Forum Jump

phpsuexec / php.ini overrides all security settings?

Reply Post New Thread In Hosting Security and Technology Subscription
 
Send news tip View All Posts Thread Tools Search this Thread Display Modes
  #1  
Old 12-02-2004, 02:57 AM
papi papi is offline
Web Hosting Guru
 
Join Date: Jan 2004
Posts: 347
Exclamation

phpsuexec / php.ini overrides all security settings?


We use cpanel and phpsuexec ..

We disable functions inside the server's main php.ini

I just noticed today that if a customer uploads an empty php.ini (or with contents, but empty will work too) inside their public_html that NONE of the disabled functions are disabled any longer.

eg. if you disable shell_exec, system etc inside your main php.ini and a customer uploads an empty php.ini to their space, they can use those functions.

I don't think this used to be the case, even with phpsuexec and suspect it may be a bug/hole.. can someone confirm?

The reason I don't think this used to be like this is because I remember quite clearly that we tried enabling a disabled function for a customer, even trying custom php.ini in customer's root dir, but it never worked ie. functions which were disabled in the main php.ini COULD NOT be re-enabled on a per-customer basis. But now it seems this is possible ... ?!

And it's not just the disable_functions that is reset/overriden when a customer uploads an empty php.ini, ALL of your php.ini settings are reset to the defaults or whatever the customer puts inside their php.ini - ie. any restrictions you placed in the main server's php.ini are no longer applicable for this customer.


Last edited by papi; 12-02-2004 at 03:02 AM.
Reply With Quote


Sponsored Links
  #2  
Old 12-02-2004, 06:19 PM
andreyka andreyka is offline
Linux Guru
 
Join Date: Mar 2004
Location: Odessa, Ukraine
Posts: 604
Well... Just upload all customers default php.ini with disabled functions and:
chown root:root php.ini
chmod 644 php.ini


__________________
My CVV Page

Reply With Quote
  #3  
Old 12-02-2004, 07:09 PM
papi papi is offline
Web Hosting Guru
 
Join Date: Jan 2004
Posts: 347
That wouldn't do crap.

When you have phpSuExec the php.ini in whatever dir you place it takes effect, so they could just have an empty one in public_html/dir1 and run the script from there.

anyway, I wasn't asking for a dirty hack solution or anything, just wondering if anyone has noticed this.

Cpanel seems to think this is the standard phpsuexec behaviour but it isn't. End users (customers) did not use to be able to un-disable disabled functions by placing an empty php.ini

Reply With Quote
Sponsored Links
  #4  
Old 12-02-2004, 10:42 PM
LP-Trel LP-Trel is offline
Web Hosting Master
 
Join Date: Jul 2003
Location: Nothing but, net
Posts: 2,062
This is just one of the problems with running phpsuexec, you have to make the choice when you choose to run it.

Reply With Quote
  #5  
Old 12-03-2004, 02:27 AM
papi papi is offline
Web Hosting Guru
 
Join Date: Jan 2004
Posts: 347
Zach

my whole point is that just a few weeks ago this did NOT use to be that case, namely, that if you place an empty php.ini in your public_html that you magically have access to all disabled php functions (disabled in the main server's php.ini)

Reply With Quote
  #6  
Old 12-03-2004, 03:08 AM
LP-Trel LP-Trel is offline
Web Hosting Master
 
Join Date: Jul 2003
Location: Nothing but, net
Posts: 2,062
Quote:
Originally posted by papi
Zach

my whole point is that just a few weeks ago this did NOT use to be that case, namely, that if you place an empty php.ini in your public_html that you magically have access to all disabled php functions (disabled in the main server's php.ini)
Hi papi,

I've been working with suphp and phpsuexec for awhile now and this has always been the case.

If you place a php.ini in the public_html directory every file executed in that directory will be using that php.ini.

Honestly this is where you get to the per user isolation problem if you don't trust the users on your system. Usually disabling the exec() family of functions doesn't really help secure your system as a whole because if you offer Perl they can do just as much damage.

Reply With Quote
Reply

Related posts from TheWhir.com
Title Type Date Posted
Web Host SingleHop Launches Automated Security Service for Dedicated, Cloud Servers Web Hosting News 2013-01-07 14:20:53
Web Optimization Provider Yottaa Launches Version 2.0, Adds Patented QuickTune Technology Web Hosting News 2012-09-17 15:18:17
Mimecast Email Security Updates Give Users, IT Departments More Control Web Hosting News 2012-08-02 17:32:44
StopTheHacker Releases Version 3.3 of Security Tool with Redesigned Dashboard Web Hosting News 2012-06-25 10:49:09
Email Security Firm eleven Launches New User Interface Web Hosting News 2011-10-06 17:39:13


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes
Postbit Selector

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump
Login:
Log in with your username and password
Username:
Password:



Forgot Password?
Advertisement:
Web Hosting News:



 

X

Welcome to WebHostingTalk.com

Create your username to jump into the discussion!

WebHostingTalk.com is the largest, most influentual web hosting community on the Internet. Join us by filling in the form below.


(4 digit year)

Already a member?