Received: (qmail 23560 invoked by uid 2012); 7 Nov 1998 08:11:11 -0000 Message-Id: <19981107081111.23559.qmail@hyperreal.org> Date: 7 Nov 1998 08:11:11 -0000 From: Luc Croteau Reply-To: lcroteau@lands.ab.ca To: apbugs@hyperreal.org Subject: Suexec always report the following error "command not in docroot" X-Send-Pr-Version: 3.2 >Number: 3361 >Category: suexec >Synopsis: Suexec always report the following error "command not in docroot" >Confidential: no >Severity: non-critical >Priority: medium >Responsible: apache >State: closed >Class: change-request >Submitter-Id: apache >Arrival-Date: Sat Nov 7 00:20:01 PST 1998 >Last-Modified: Sun Nov 8 13:27:05 PST 1998 >Originator: lcroteau@lands.ab.ca >Organization: >Release: 1.3.3 >Environment: BSD/OS main.ls.barrhead.ab.ca 3.1 BSDI BSD/OS 3.1 Kernel #0: Sat Nov 1 20:27:06 MST 1997 lcroteau@main.ls.barrhead.ab.ca:/usr/src/sys/compile/Nov01-1997 i 386, with all patches. >Description: I have made a very basic installation of Apache using the following command ./configure --sysconfdir=/usr/var/www/conf \ --logfiledir=/usr/var/log/httpd \ --runtimedir=/usr/var/run \ --datadir=/usr/var/www \ --enable-suexec \ --suexec-caller=www \ --suexec-userdir=/usr/var/www \ --suexec-uidmin=100 \ --suexec-gidmin=85 \ --suexec-safepath="/bin:/usr/bin" Prior to this, I have edit ../src/support/suexec.h my modifying the following line /* * DOC_ROOT -- Define as the DocumentRoot set for Apache. This * will be the only hierarchy (aside from UserDirs) * that can be used for suEXEC behavior. */ #ifndef DOC_ROOT #define DOC_ROOT "/usr/var/www" #endif I know that apache loaded suexec when started as per following error_log entry [Sat Nov 7 00:45:46 1998] [notice] Apache/1.3.3 (Unix) configured -- resuming n ormal operations [Sat Nov 7 00:45:46 1998] [notice] suEXEC mechanism enabled (wrapper: /usr/loca l/apache/sbin/suexec) However, everytime I try to start a cgi (Count.cgi) in this case I get the same error messages One error message in error_log [Sat Nov 7 01:05:09 1998] [error] [client 206.75.114.41] Premature end of scrip t headers: /usr/var/www/docs/cgi-bin/Count.cgi and one in suexec_log [1998-11-07 01:05:09]: uid: (lcroteau/lcroteau) gid: (mall/mall) cmd: Count.cgi [1998-11-07 01:05:09]: command not in docroot (/usr/var/www/docs/cgi-bin/Count.c gi) My previous version of Apache (Server: Apache/1.2.4) works without any problem for suexec Let me know if you would like any other information about my system. >How-To-Repeat: If you would like, I can reload 1.3.3 and run any scripts that would help you figure out the problem. Just let me know what you would like. >Fix: >Audit-Trail: State-Changed-From-To: open-analyzed State-Changed-By: lars State-Changed-When: Sat Nov 7 09:57:39 PST 1998 State-Changed-Why: If you configure with "--data-dir=/usr/var/www" suexec is compiled with "/usr/var/www/htdocs" as DOC_ROOT. "--suexec_userdir" is only used for "/~user/..." requests, but it looks like you are trying to use suexec with virtual hosts. In my opinion we should add a "--suexec-docroot" switch to the configure script and not add "htdocs" automatically to the datadir. I'll take a closer look at this problem. Thanks for your report. Release-Changed-From-To: Apache/1.3.3 (Unix)-1.3.3 Release-Changed-By: lars Release-Changed-When: Sat Nov 7 09:57:39 PST 1998 Class-Changed-From-To: sw-bug-change-request Class-Changed-By: lars Class-Changed-When: Sat Nov 7 09:57:39 PST 1998 State-Changed-From-To: analyzed-closed State-Changed-By: lars State-Changed-When: Sun Nov 8 13:27:05 PST 1998 State-Changed-Why: Two new options (--suexec-docroot and --suexec-logfile) have been added to APACI to allow full control of the suEXEC setup. >Unformatted: [In order for any reply to be added to the PR database, ] [you need to include in the Cc line ] [and leave the subject line UNCHANGED. This is not done] [automatically because of the potential for mail loops. ] [If you do not include this Cc, your reply may be ig- ] [nored unless you are responding to an explicit request ] [from a developer. ] [Reply only with text; DO NOT SEND ATTACHMENTS! ]