suexec problem

4 posts / 0 new
Last post
#1 Mon, 12/06/2010 - 20:26
m4d3l

suexec problem

Hi,

I just buy a new server and install Virtualmin to migrate my hold cpanel server. All migration was done very well except one think. it look my php script doesnt run as account owner but run as www-data. So every script trying to write cache or edit file not working.

I have try what is on that post : http://www.virtualmin.com/node/8462

here is my actual configuration :

SuexecUserGroup usertest usertest
ServerName mydomaine.com
ServerAlias www.mydomaine.com
ServerAlias webmail.cesttoilechef.com
ServerAlias admin.cesttoilechef.com
DocumentRoot /home/usertest/public_html
ErrorLog /var/log/virtualmin/mydomaine.com_error_log
CustomLog /var/log/virtualmin/mydomaine.com_access_log combined
ScriptAlias /cgi-bin /home/usertest/public_html/cgi-bin
DirectoryIndex index.html index.htm index.php index.php4 index.php5
<Directory /home/usertest/public_html>
Options -Indexes +IncludesNOEXEC +FollowSymLinks +ExecCGI
allow from all
AllowOverride All
AddHandler fcgid-script .php
AddHandler fcgid-script .php5
FCGIWrapper /home/usertest/fcgi-bin/php5.fcgi .php
FCGIWrapper /home/usertest/fcgi-bin/php5.fcgi .php5
</Directory>
<Directory /home/usertest/cgi-bin>
allow from all
</Directory>
RewriteEngine on
RewriteCond %{HTTP_HOST} =webmail.mydomaine.com
RewriteRule ^(.*) https://mydomaine.com:20000/ [R]
RewriteCond %{HTTP_HOST} =admin.mydomaine.com
RewriteRule ^(.*) https://mydomaine.com:10000/ [R]
RemoveHandler .php
RemoveHandler .php5
IPCCommTimeout 31

I wish someone would be able to help me.

Mon, 12/06/2010 - 20:39
andreychek

Howdy,

The post you linked to is actually no longer necessary -- recent Virtualmin versions offer that as a built-in feature.

If you go into Server Configuration -> Website Options, try selecting a PHP Execution mode of "CGI". Once you do that, does it work correctly for you?

If not, do you see any errors in the Apache log file, $HOME/logs/error_log?

-Eric

Mon, 12/06/2010 - 21:02
m4d3l
tail -f /home/usertest/logs/error_log
[Mon Dec 06 21:56:27 2010] [error] [client 74.59.109.188] PHP Fatal error:  Uncaught exception 'Zend_Cache_Exception' with message 'cache_dir is not writable'

I have try 777, 755, 644 permission on every writable directory.

I have same problem if I create a new virtualhost from scratch or from cpanel import.

When using top then refresh page to see the process I can see :

top
26501 www-data  20   0  230m  13m 3840 S    1  0.4   0:00.85 /usr/sbin/apache2 -k start
Mon, 12/06/2010 - 21:05
m4d3l

oh and I try CGI. it doesnt change anything.

Topic locked