Easy::Apache - Mod Ruid2 - error

nagyosha

Member
Mar 9, 2014
19
0
1
cPanel Access Level
Root Administrator
Hi All.
new to cpanel . setting up on a VPS. centos. plenty of ram etc.
I've spent a lot of time hardening and make sure everything is just right before i start porting all the sites & users over from another server
and trying to close security problems up before i start.
one last thing I'm having problems with now. i have read about Mod Ruid2 and it seems a good idea to enable it (i think).
when i build with it on then the test reseller account website i have setup fails Internal Server Error.. error from logs below..
tried chmod +s /opt/suphp/sbin/suphp and make no difference

if i compile without Mod Ruid2 all works ok.

[Sun Mar 09 20:02:02 2014] [notice] Apache/2.2.26 (Unix) mod_ssl/2.2.26 OpenSSL/1.0.1e-fips mod_bwlimited/1.4 configured -- resuming normal operations
[Sun Mar 09 20:02:02 2014] [error] [client 82.46.xxx.xxx] SecurityException in Application.cpp:186: Do not have root privileges. Executable not set-uid root?
[Sun Mar 09 20:02:02 2014] [error] [client 82.46..xxx.xxx] Premature end of script headers: index.php
[Sun Mar 09 20:02:02 2014] [error] [client 82.46.xxx.xxx] File does not exist: /home/easydoma/public_html/500.shtml
 

KurtN.

Well-Known Member
Jan 29, 2013
95
1
83
cPanel Access Level
Root Administrator
  1. The permissions of the suphp binary should be 04755.
  2. When you have Mod Ruid2 installed, what PHP handler do you have set? Copy and paste the following output: cat /usr/local/apache/conf/php.conf
 

nagyosha

Member
Mar 9, 2014
19
0
1
cPanel Access Level
Root Administrator
  1. The permissions of the suphp binary should be 04755.
  2. When you have Mod Ruid2 installed, what PHP handler do you have set? Copy and paste the following output: cat /usr/local/apache/conf/php.conf
i resolved this ..
i was trying to use ruid2 and suPHP at the same time.. assume this is a no no
 

hdjacobh

Registered
Mar 12, 2013
1
0
1
cPanel Access Level
Root Administrator
lol. you can either use one or the other. Interesting the EA would let you use both at the same time though.
Really, the only PHP handler mod_ruid2 doesn't support is FastCGI due to incompatibilities with changing the Apache process' UID/GID. It's only recommended to use DSO over suPHP because ruid2 replaces some of the suPHP functionality (setting the Apache child processes as the script owner rather than 'nobody')... and, well, DSO+opcode caching blows suPHP out of the water.
 

nagyosha

Member
Mar 9, 2014
19
0
1
cPanel Access Level
Root Administrator
Really, the only PHP handler mod_ruid2 doesn't support is FastCGI due to incompatibilities with changing the Apache process' UID/GID. It's only recommended to use DSO over suPHP because ruid2 replaces some of the suPHP functionality (setting the Apache child processes as the script owner rather than 'nobody')... and, well, DSO+opcode caching blows suPHP out of the water.
"DSO+opcode caching blows suPHP out of the water."
which caching is best .. EAccelerator or Xcache .. or another ?