Problems with suexec/fastcgid and virtualmin

Since a few version of virtualmin I had some problems with checking the server configuration.

Virtualmin 3.72.gpl_webmin_error

The problem is that I have manually patched suexec and the php fcgid script is in /var/www and not /home.

I had this error for quite a while but last week I fixed it. It was quite simple. Just change this code in “/usr/share/webmin/virtual-server/feature-web.pl:

# Make sure home base is under base directory, or template CGI directory is
if ($tmpl->{'web_suexec'} && $suhome &&
!&same_file($suhome, $home_base) &&
!&is_under_directory($suhome, $home_base) &&
(!$cgibase || !&is_under_directory($suhome, $cgibase))) {
return &text('check_ewebsuexechome',
"<tt>$home_base</tt>", "<tt>$suhome</tt>");
}

<p style="text-align: left;">return undef;
}

To:

# Make sure home base is under base directory, or template CGI directory is
return undef;
if ($tmpl-&gt;{'web_suexec'} &amp;&amp; $suhome &amp;&amp;
!&amp;same_file($suhome, $home_base) &amp;&amp;
!&amp;is_under_directory($suhome, $home_base) &amp;&amp;
(!$cgibase || !&amp;is_under_directory($suhome, $cgibase))) {
return &amp;text('check_ewebsuexechome',
"&lt;tt&gt;$home_base&lt;/tt&gt;", "&lt;tt&gt;$suhome&lt;/tt&gt;");
}  return undef;
}

So just add “return undef;” to the top of that piece of code. Then it will step out of the function before the additional check is executed.

# Make sure home base is under base directory, or template CGI directory is
if ($tmpl->{‘web_suexec’} && $suhome &&
!&same_file($suhome, $home_base) &&
!&is_under_directory($suhome, $home_base) &&
(!$cgibase || !&is_under_directory($suhome, $cgibase))) {
return &text(‘check_ewebsuexechome’,
“<tt>$home_base</tt>”, “<tt>$suhome</tt>”);
}
return undef;
}

0 comments ↓

There are no comments yet...Kick things off by filling out the form below.

Leave a Comment