You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Divyank Turakhia <di...@directi.com> on 2002/05/03 21:47:12 UTC

SuexecUserGroup & apache 2.0.35

Hi,

I'm having a little problem with suexec.
I configured apache with following suexec options :  --enable-suexec
--with-suexec-caller=99 --with-suexec-docroot=/domains
--with-suexec-uidmin=500 --with-suexec-gidmin=500
--with-suexec-logfile=/usr/local/apache2/logs/suexec_log 

I need several virtualhosts, this is an example of one :

<VirtualHost 192.168.1.192>

ServerName www.test33.com
ServerAdmin apacherrors
DocumentRoot /domains/www.test33.com/web

SuexecUserGroup test33 site47

AddHandler cgi-script .cgi
AddHandler cgi-script .pl
<Directory /domains/www.test33.com/web/>
    Options ExecCGI
</Directory>

</VirtualHost>

And 
i have a valid user named "test33" uid=572
Valid group site47 gid=584

Now whenever i try to execute http://192.168.1.192/test.cgi i get the
internal server error and following entry in suexec_log : [2002-05-04
00:40:33]: user mismatch (nobody instead of 99)

(when i delete the SuexecUserGroup directive in my virtualhost then the
script executes fine, but as the default apache user, nobody, this is
not what i need.) By reading the suexec.html I found the follows:

<quote>

One way to use the suEXEC wrapper is through the User and Group
directives in VirtualHost definitions. By setting these directives to
values different from the main server user ID, all requests for CGI
resources will be executed as the User and Group defined for that
<VirtualHost>. If only one or neither of these directives are specified
for a <VirtualHost> then the main server userid is assumed

</quote>

Can anyone tell me what i am doing wrong ?

Regards,
Divyank



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


RE: SuexecUserGroup & apache 2.0.35

Posted by Divyank Turakhia <di...@directi.com>.
> Check this quote from the same page:
> 3.  Is this valid user allowed to run the wrapper?
> Is this user the user allowed to run this wrapper? Only one
> user (the Apache user) is allowed to execute this program.

I want different users to run cgi files per virtual host which is why I
am trying to use SuexecUserGroup. When I remove the SuexecUserGroup line
from the virtual host, the cgi file works properly and displays correct
results as it is running as nobody (the apache user in the global
settings of httpd.conf). When "SuexecUserGroup test33 site47" is
specified inside the virtualhost directive I guess the cgi scripts
should run as user test33, but it is giving an error "user mismatch
(nobody instead of 99)"


> 
> You said in building apache that suexec was going to be
> called by user "99".  Instead, it is being called by "nobody" 
> (from the User directive in httpd.conf).  You need to 
> recompile using --with-suexec-caller=nobody.
> 
> Joshua.
> 

The uid of nobody is 99 hence I have specified --with-suexec-caller=99.
I tried recompiling it too with --with-suexec-caller=nobody but I get
same error


Thanks,
Divyank


> -----Original Message-----
> From: Joshua Slive [mailto:joshua@slive.ca]
> Sent: Saturday, May 04, 2002 1:25 AM
> To: users@httpd.apache.org
> Subject: Re: SuexecUserGroup & apache 2.0.35
> 
> 
> 
> On Sat, 4 May 2002, Divyank Turakhia wrote:
> 
> > Hi,
> >
> > I'm having a little problem with suexec.
> > I configured apache with following suexec options :
> --enable-suexec
> > --with-suexec-caller=99 --with-suexec-docroot=/domains
> 
> > Now whenever i try to execute http://192.168.1.192/test.cgi
> i get the
> > internal server error and following entry in suexec_log :
> [2002-05-04
> > 00:40:33]: user mismatch (nobody instead of 99)
> 
> Check this quote from the same page:
> 3.  Is this valid user allowed to run the wrapper?
> Is this user the user allowed to run this wrapper? Only one
> user (the Apache user) is allowed to execute this program.
> 
> You said in building apache that suexec was going to be
> called by user "99".  Instead, it is being called by "nobody" 
> (from the User directive in httpd.conf).  You need to 
> recompile using --with-suexec-caller=nobody.
> 
> Joshua.
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org
> 
> 
> 



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: SuexecUserGroup & apache 2.0.35

Posted by Joshua Slive <jo...@slive.ca>.
On Sat, 4 May 2002, Divyank Turakhia wrote:

> Hi,
>
> I'm having a little problem with suexec.
> I configured apache with following suexec options :  --enable-suexec
> --with-suexec-caller=99 --with-suexec-docroot=/domains

> Now whenever i try to execute http://192.168.1.192/test.cgi i get the
> internal server error and following entry in suexec_log : [2002-05-04
> 00:40:33]: user mismatch (nobody instead of 99)

Check this quote from the same page:
3.  Is this valid user allowed to run the wrapper?
Is this user the user allowed to run this wrapper? Only one user (the
Apache user) is allowed to execute this program.

You said in building apache that suexec was going to be called by user
"99".  Instead, it is being called by "nobody" (from the User directive in
httpd.conf).  You need to recompile using --with-suexec-caller=nobody.

Joshua.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org