ispCP - Board - Support
ISPCP, suexec, and server side includes (SSI) - Printable Version

+- ispCP - Board - Support (http://www.isp-control.net/forum)
+-- Forum: ispCP Omega Support Area (/forum-30.html)
+--- Forum: Usage (/forum-34.html)
+--- Thread: ISPCP, suexec, and server side includes (SSI) (/thread-3168.html)



ISPCP, suexec, and server side includes (SSI) - bl968 - 04-30-2008 05:43 AM

I am using debian 4.0 on a clean install.

I use a lot of SSI scripts to display information in web pages. Due to the required use of suexec in ISPCP this does not work in the default installation configuration..

The reason is with the layout of ISPCP vs the configuration of suexec...

/usr/lib/apache2/suexec -V
-D AP_DOC_ROOT="/var/www"
-D AP_GID_MIN=100
-D AP_HTTPD_USER="www-data"
-D AP_LOG_EXEC="/var/log/apache2/suexec.log"
-D AP_SAFE_PATH="/usr/local/bin:/usr/bin:/bin"
-D AP_UID_MIN=100
-D AP_USERDIR_SUFFIX="public_html"


Suexec requires that the calling pages be located in

/var/www/username/public_html

ISPCP's format is a bit different.

/var/www/virtual/username/htdocs

If suexec is enabled ISPCP works but server side includes do not. If I disable suexec ISPCP does not work, but server side includes do.

So what do we need to do to fix this, because if we can't I have to keep looking for another hosting control panel. I sadly can't wait more than a day for a fix or workaround.


RE: ISPCP, suexec, and server side includes (SSI) - ephigenie - 04-30-2008 05:50 AM

SSI should work with suexec - just fine.

See the suexec conditions :
http://httpd.apache.org/docs/2.0/suexec.html
If your SSI scripts matches these conditions it will work with ispCP Smile


RE: ISPCP, suexec, and server side includes (SSI) - bl968 - 04-30-2008 06:05 AM

ephigenie Wrote:SSI should work with suexec - just fine.

See the suexec conditions :
http://httpd.apache.org/docs/2.0/suexec.html
If your SSI scripts matches these conditions it will work with ispCP Smile

Oh really?

less /var/log/apache2/error.log

suexec policy violation: see suexec log for more details
suexec policy violation: see suexec log for more details
suexec policy violation: see suexec log for more details
suexec policy violation: see suexec log for more details

less /var/log/apache2/suexec.log

[2008-04-29 10:57:55]: uid: (2002/vu2002) gid: (2002/2002) cmd: bible.cgi
[2008-04-29 10:57:55]: cannot stat program: (bible.cgi)
[2008-04-29 10:57:55]: uid: (2002/vu2002) gid: (2002/2002) cmd: whatsnew.cgi
[2008-04-29 10:57:55]: cannot stat program: (whatsnew.cgi)
[2008-04-29 10:57:55]: uid: (2002/vu2002) gid: (2002/2002) cmd: getweather.cgi
[2008-04-29 10:57:55]: cannot stat program: (getweather.cgi)

ls -l /var/www/virtual/somedomain.com/cgi-bin/

-rwxr-xr-x 1 vu2002 vu2002 395 2008-04-28 20:40 bible.cgi
-rwxr-xr-x 1 vu2002 vu2002 8805 2008-04-28 19:57 getweather.cgi
-rwxr-xr-x 1 vu2002 vu2002 3366 2008-04-28 20:00 whatsnew.cgi

/var/www/virtual/somedomain.com/htdocs# grep "exec cmd" index.htm
<!--#exec cmd="/var/www/virtual/somedomain.com/cgi-bin/bible.cgi"-->
<!--#exec cmd="/var/www/virtual/somedomain.com/cgi-bin/whatsnew.cgi"-->
<!--#exec cmd="/var/www/virtual/somedomain.com/cgi-bin/getweather.cgi"-->

I have tried full paths, partial paths (virtual/somedomain.com/cgi-bin/getweather.cgi), and even just (/cgi-bin/getweather.cgi) none of them worked. Disabling suexec worked every time.

Everything looks proper to me. Come on I checked and double checked all this before I posted.


RE: ISPCP, suexec, and server side includes (SSI) - ephigenie - 04-30-2008 06:27 AM

who's the owner of the scripts ?
pls post a "ls -la" of /cgi-bin/ of that domain.


RE: ISPCP, suexec, and server side includes (SSI) - bl968 - 04-30-2008 06:42 AM

ephigenie Wrote:who's the owner of the scripts ?
pls post a "ls -la" of /cgi-bin/ of that domain.

/var/www/virtual/somedomain.com# ls -la

drwxr-xr-x 3 vu2002 vu2002 4096 2008-04-28 20:40 cgi-bin

here's an ls -la of the scripts from the cgi-bin...

-rwxr-xr-x 1 vu2002 vu2002 395 2008-04-28 20:40 bible.cgi
-rwxr-xr-x 1 vu2002 vu2002 8805 2008-04-28 19:57 getweather.cgi
-rwxr-xr-x 1 vu2002 vu2002 3366 2008-04-28 20:00 whatsnew.cgi


RE: ISPCP, suexec, and server side includes (SSI) - ephigenie - 05-04-2008 11:30 PM

I'll check this out today on one of my own servers.
If i can reproduce or find a failure - i'll post here.