You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by "Tom Ray [Lists]" <li...@blazestudios.com> on 2005/01/19 18:32:39 UTC

[users@httpd] Apache 2.0 / Suexec2 Question

Hey there-

I just created a web server with SuSE 9.1 straight from the box with 
Apache 2.0 my question is this: It seems that Suexec is installed 
because I see it give me this in the error_log [notice] suEXEC mechanism 
enabled (wrapper: /usr/sbin/suexec2), however, when I set 
SuexecUserGroup in the <VirtualHosts> section, I get a 500 Error tell me 
that it's Premature end of script headers but when I comment out the 
SuexecUserGroup so it runs as the webserver, everything runs fine.

Is there a way to fix that without re-compiling and if there isn't how 
do I recompile with --enable-suexec since I did everything via yast

Any help would be great!

Thanks!

---------------------------------------------------------------------
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] Apache 2.0 / Suexec2 Question

Posted by Joshua Slive <js...@gmail.com>.
On Wed, 19 Jan 2005 21:45:30 -0500, Tom Ray [Lists]
<li...@blazestudios.com> wrote:
> So can I use mod_userdir to tell suexec to run scripts as that user
> under /home/airtool/domain.com/cgi-bin?

Unlikely.  mod_userdir requires the path to start with "~" and does
mapping in a very specific way.  It won't work for generic vhosts.

Depending on what your other virtual hosts look like, you should
either recompile suexec with a new doc-root, or you should move your
websites to be were suexec expects them.

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


Re: [users@httpd] Apache 2.0 / Suexec2 Question

Posted by "Tom Ray [Lists]" <li...@blazestudios.com>.
So can I use mod_userdir to tell suexec to run scripts as that user 
under /home/airtool/domain.com/cgi-bin?

Joshua Slive wrote:

>On Wed, 19 Jan 2005 13:30:26 -0500, Tom Ray [Lists]
><li...@blazestudios.com> wrote:
>  
>
>>Joshua-
>>
>>Thanks for the reply, I found the suexec.log file and this is what I get:
>>
>>[2005-01-19 14:25:29]: uid: (1001/airtool) gid: (100/100) cmd: test.cgi
>>[2005-01-19 14:25:29]: command not in docroot
>>(/home/airtool/domain.com/cgi-bin/test.cgi)
>>
>>My suexec configuration details are:
>>
>>-D AP_DOC_ROOT="/srv/www/htdocs"
>>    
>>
>
>All suexec-executed scripts must be under that directory (unless they
>are accessed through mod_userdir).
>
>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
>  
>

---------------------------------------------------------------------
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] Apache 2.0 / Suexec2 Question

Posted by Joshua Slive <js...@gmail.com>.
On Wed, 19 Jan 2005 13:30:26 -0500, Tom Ray [Lists]
<li...@blazestudios.com> wrote:
> Joshua-
> 
> Thanks for the reply, I found the suexec.log file and this is what I get:
> 
> [2005-01-19 14:25:29]: uid: (1001/airtool) gid: (100/100) cmd: test.cgi
> [2005-01-19 14:25:29]: command not in docroot
> (/home/airtool/domain.com/cgi-bin/test.cgi)
> 
> My suexec configuration details are:
> 
> -D AP_DOC_ROOT="/srv/www/htdocs"

All suexec-executed scripts must be under that directory (unless they
are accessed through mod_userdir).

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


Re: [users@httpd] Apache 2.0 / Suexec2 Question

Posted by "Tom Ray [Lists]" <li...@blazestudios.com>.
Joshua-

Thanks for the reply, I found the suexec.log file and this is what I get:

[2005-01-19 14:25:29]: uid: (1001/airtool) gid: (100/100) cmd: test.cgi
[2005-01-19 14:25:29]: command not in docroot 
(/home/airtool/domain.com/cgi-bin/test.cgi)

My suexec configuration details are:

 -D AP_DOC_ROOT="/srv/www/htdocs"
 -D AP_GID_MIN=96
 -D AP_HTTPD_USER="wwwrun"
 -D AP_LOG_EXEC="/var/log/apache2/suexec.log"
 -D AP_SAFE_PATH="/usr/local/bin:/usr/bin:/bin"
 -D AP_UID_MIN=96
 -D AP_USERDIR_SUFFIX="public_html"

Joshua Slive wrote:

>On Wed, 19 Jan 2005 12:32:39 -0500, Tom Ray [Lists]
><li...@blazestudios.com> wrote:
>  
>
>>Hey there-
>>
>>I just created a web server with SuSE 9.1 straight from the box with
>>Apache 2.0 my question is this: It seems that Suexec is installed
>>because I see it give me this in the error_log [notice] suEXEC mechanism
>>enabled (wrapper: /usr/sbin/suexec2), however, when I set
>>SuexecUserGroup in the <VirtualHosts> section, I get a 500 Error tell me
>>that it's Premature end of script headers but when I comment out the
>>SuexecUserGroup so it runs as the webserver, everything runs fine.
>>
>>Is there a way to fix that without re-compiling and if there isn't how
>>do I recompile with --enable-suexec since I did everything via yast
>>    
>>
>
>Start by looking in the suexec_log to find the source of the problem.
>
>If you can't find the suexec log, find the suexec binary and run
>"suexec -V" as root to get the configuration details.
>
>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
>  
>

---------------------------------------------------------------------
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] Apache 2.0 / Suexec2 Question

Posted by Joshua Slive <js...@gmail.com>.
On Wed, 19 Jan 2005 12:32:39 -0500, Tom Ray [Lists]
<li...@blazestudios.com> wrote:
> Hey there-
> 
> I just created a web server with SuSE 9.1 straight from the box with
> Apache 2.0 my question is this: It seems that Suexec is installed
> because I see it give me this in the error_log [notice] suEXEC mechanism
> enabled (wrapper: /usr/sbin/suexec2), however, when I set
> SuexecUserGroup in the <VirtualHosts> section, I get a 500 Error tell me
> that it's Premature end of script headers but when I comment out the
> SuexecUserGroup so it runs as the webserver, everything runs fine.
> 
> Is there a way to fix that without re-compiling and if there isn't how
> do I recompile with --enable-suexec since I did everything via yast

Start by looking in the suexec_log to find the source of the problem.

If you can't find the suexec log, find the suexec binary and run
"suexec -V" as root to get the configuration details.

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


Re: [users@httpd] Apache 2.0 / Suexec2 Question

Posted by Nick Kew <ni...@webthing.com>.
On Wednesday 19 January 2005 17:32, Tom Ray [Lists] wrote:
> however, when I set
> SuexecUserGroup in the <VirtualHosts> section, I get a 500 Error tell me
> that it's Premature end of script headers but when I comment out the
> SuexecUserGroup so it runs as the webserver, everything runs fine.

Look for helpful error messages in suexec.log.

-- 
Nick Kew

---------------------------------------------------------------------
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