suexec problem


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 :

here is my actual configuration :

SuexecUserGroup usertest usertest
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 /home/usertest/cgi-bin>
allow from all
RewriteEngine on
RewriteCond %{HTTP_HOST}
RewriteRule ^(.*) [R]
RewriteCond %{HTTP_HOST}
RewriteRule ^(.*) [R]
RemoveHandler .php
RemoveHandler .php5
IPCCommTimeout 31

I wish someone would be able to help me.


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?


#tail -f /home/usertest/logs/error_log

[Mon Dec 06 21:56:27 2010] [error] [client] 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 :


26501 www-data  20   0  230m  13m 3840 S    1  0.4   0:00.85 /usr/sbin/apache2 -k start

oh and I try CGI. it doesnt change anything.