You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Saisab Pradhan <sp...@icimod.org.np> on 2004/08/13 11:21:39 UTC

[users@httpd] Help with suexec

Hi,

I have configured apache 1.3 with suexec option enabled on solaris 8.0. The 
suexec caller has been set to "cgi", min gid and uid are 100, cgi user 
exists with uid  1004 and also cgi group with gid 102. It seems to have 
installed correctly i.e. when i do

httpd -l , it gives

Compiled-in modules:
   http_core.c
   mod_so.c
suexec: enabled; valid wrapper /usr/local/apache/bin/suexec

and suexec -V command shows

-D DOC_ROOT="/usr/local/apache/test"
  -D GID_MID=100
  -D HTTPD_USER="cgi"
  -D LOG_EXEC="/usr/local/apache/logs/suexec_log"
  -D SAFE_PATH="/usr/local/bin:/usr/bin:/bin"
  -D UID_MID=100
  -D USERDIR_SUFFIX="public_html"

I setup a virtual host for my domain, the entries are

<VirtualHost myipaddress>
     User cgi
     Group cgi
     ServerName myservername
     DocumentRoot /usr/local/apache/test
      ScriptAlias /cgi-bin/ "/usr/local/apache/cgi-bin/test/"
<Directory "/usr/local/apache/cgi-bin/test">

     AllowOverride None
     options ExecCGI
     AddHandler cgi-script .cgi
     AuthType Basic
     AuthName " Test Login"
     AuthUserFile /usr/local/apache/passwd/dspampassword
     Require valid-user
</Directory>
</VirtualHost>

But when I try to run test.cgi script in that directory, su_exec.log gives 
error

[2004-08-13 12:10:51]: crit: calling user mismatch (nobody instead of cgi)

and error log shows

[Fri Aug 13 12:10:51 2004] [error] [client 202.52.254.7] Premature end of 
script headers: /usr/local/apache/cgi-bin/dir/test.cgi

Please help,

Thanks in advance...


SP


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] Help with suexec

Posted by Joshua Slive <js...@gmail.com>.
On Fri, 13 Aug 2004 15:06:39 +0545, Saisab Pradhan
<sp...@icimod.org.np> wrote:
> Hi,
> 
> I have configured apache 1.3 with suexec option enabled on solaris 8.0. The
> suexec caller has been set to "cgi"

> [2004-08-13 12:10:51]: crit: calling user mismatch (nobody instead of cgi)

The suexec caller must be the userid of the process that calls suexec.
 Since suexec is called by the httpd child processes, this must be the
userid specified in the User directive in httpd.conf.  In your case,
you have "nobody" specified in httpd.conf, so either change the suexec
caller to nobody, or change your User directive in httpd.conf to cgi.

Joshua.

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org