hosted by liquidweb


Go Back   Web Hosting Talk : Web Hosting Main Forums : Hosting Security and Technology : PHP suEXEC vs. suEXEC in WHM
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

PHP suEXEC vs. suEXEC in WHM

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 09-14-2005, 02:04 PM
jailbird2 jailbird2 is offline
WHT Addict
 
Join Date: Jan 2004
Location: Croatia
Posts: 146

PHP suEXEC vs. suEXEC in WHM


Hi!

I WHM Apache update, there is option to update or install PHP suEXEC Support and suEXEC Module.

What is the exact difference between those two?

When i use PHP suEXEC Support then all php scripts does not work.
When I use only suEXEC Module then all scripts works OK.

Is suEXEC Module enough for improved protection and preventing to run as nobody or not?

Thanks for answers!

jailbird2

Reply With Quote


Sponsored Links
  #2  
Old 09-14-2005, 03:42 PM
Devil Inside Devil Inside is offline
Web Hosting Evangelist
 
Join Date: Nov 2003
Posts: 516
nope - php_suexec is best.

I assume you're getting 500 internal server error when running a php script with php_suexec?

If that's the case - you'd just need to change permissions on php scripts to 644.

php_suexec disallows the operation of php scripts that have insecure permissions. It forces a higher level of security for the server more or less.

(that's the short version)

Reply With Quote
  #3  
Old 09-14-2005, 03:47 PM
jailbird2 jailbird2 is offline
WHT Addict
 
Join Date: Jan 2004
Location: Croatia
Posts: 146
Thanks for answer, only problem is that 644 still generates 500 Internal server error. 666 also, 755 also, even 777 in most cases do the same thing.

jailbird2

Reply With Quote
Sponsored Links
  #4  
Old 09-14-2005, 07:10 PM
flashwebhost flashwebhost is offline
Web Hosting Master
 
Join Date: Jan 2002
Posts: 1,346
You can check error log in Cpanel, that will give you reason for the error. May be the folder containing the php scripts got 777 permission

__________________
WebHostingNeeds.com

Reply With Quote
  #5  
Old 09-15-2005, 01:28 AM
Devil Inside Devil Inside is offline
Web Hosting Evangelist
 
Join Date: Nov 2003
Posts: 516
I think you then need/want to run all these scripts via root shell:

/scripts/initsuexec
/scripts/fixallcartswithsuexec
/scripts/fixmailmanwithsuexec
/scripts/fixoldlistswithsuexec
/scripts/fixsuexeccgiscripts
/scripts/postsuexecinstall
/scripts/phpopenbasectl
/scripts/chownpublichtmls

And of course in WHM:
Security --> Tweak Security --> Php open_basedir Tweak --> Configure
Enable it.

Exclude the hostname of the server if you allow your clients to access their web space via http://hostname/~username/ before their domain propagates. If they use the IP rather than the hostname - you shouldn't need to exclude the hostname from protection.

Reply With Quote
  #6  
Old 09-15-2005, 05:35 AM
sprintserve sprintserve is offline
Retired Moderator
 
Join Date: Jan 2003
Posts: 9,000
Suexec in WHM is for CGI. PHPSuexec in apache compiles is for PHP.

If you are getting 500 errors and permissions is correct, check your .htaccess for PHP flags. Those will break a site under phpsuexec.

__________________
••• 100% Customer Satisfaction!!! •••
••• http://www.sprintserve.net •••
••• Offering: | Internap FCP Bandwidth! | Rebootless Kernel Updates! | Magento Optimized Hosting | •••
••• Services: | Managed Multiple Cores 64bit Servers | Server Management | •••

Reply With Quote
  #7  
Old 09-16-2005, 05:18 AM
Devil Inside Devil Inside is offline
Web Hosting Evangelist
 
Join Date: Nov 2003
Posts: 516
Oh - right on sprintserve. Forgot to mention that.

Additionally - if you need to control PHP directives - as sprint mentioned, it won't work in .htaccess.

Instead - you'll need to set php directives using php.ini files.

However, with .htaccess - the settings carry down into all directories below the one that the .htaccess file is located in.

php.ini will not do this. Instead - a php.ini must be located in each directory that requires the changes made in the php.ini.

Reply With Quote
  #8  
Old 09-16-2005, 11:48 PM
brianoz brianoz is offline
Web Hosting Master
 
Join Date: Nov 2004
Location: Australia
Posts: 1,440
In my experience, the most likely cause of the 500 error from a PHP script is a problem with script ownership, and this isn't mentioned above. For instance, if a script is running under the user somesite and URL www.somesite.com/index.php, you'd need to make sure index.php is owned by user somesite. (it should be sufficient for it to be owned by root, but it isn't).

Check out /usr/local/apache/logs/suexec_log for the exact cause; if the cause was suexec related, there will be a line there which will help.

Reply With Quote
Reply

Related posts from TheWhir.com
Title Type Date Posted


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?