You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Erwin Knobbe <kn...@chello.nl> on 2003/12/08 12:47:11 UTC
[users@httpd] SUEXEC
Hello,
I am trying to get SUEXEC working on apache 2.x. I use redhat 9. I have
recompiled the rpm with suexec support.
When i start apache i can see in the error log that SUEXEC starts up. My
cgi-bin is in the users home folder ( /home/xxx/cgi-bin)
But it doesn't work. I get this message when executing a test cgi
script: -Premature end of script headers: test.cgi
I get this message in suexec log file: cannot get docroot information
(/home).
Anyone an idee? I searched google but coulnd't find the right answer.
Grtz
EK
---------------------------------------------------------------------
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] SUEXEC
Posted by Erwin Knobbe <kn...@chello.nl>.
Hi,
My /home does exist. Under the /home directory are all my users/vhost dirs.
Everything is working fine except the cgi-bin.
Grtz
-----Oorspronkelijk bericht-----
Van: Andre Malo [mailto:nd@perlig.de]
Verzonden: maandag 8 december 2003 20:41
Aan: users@httpd.apache.org
Onderwerp: Re: [users@httpd] SUEXEC
* "Erwin Knobbe" <kn...@chello.nl> wrote:
> Hello,
>
> I am trying to get SUEXEC working on apache 2.x. I use redhat 9. I have
> recompiled the rpm with suexec support.
> When i start apache i can see in the error log that SUEXEC starts up. My
> cgi-bin is in the users home folder ( /home/xxx/cgi-bin)
> But it doesn't work. I get this message when executing a test cgi
> script: -Premature end of script headers: test.cgi
> I get this message in suexec log file: cannot get docroot information
> (/home).
>
> Anyone an idee? I searched google but coulnd't find the right answer.
It typically means, that suexec cannot chdir into the desired directory for
some reason. This is the corresponding code:
if (userdir) {
if (((chdir(target_homedir)) != 0) ||
((chdir(AP_USERDIR_SUFFIX)) != 0) ||
((getcwd(dwd, AP_MAXPATH)) == NULL) ||
((chdir(cwd)) != 0)) {
log_err("cannot get docroot information (%s)\n",
target_homedir);
exit(112);
}
}
else {
if (((chdir(AP_DOC_ROOT)) != 0) ||
((getcwd(dwd, AP_MAXPATH)) == NULL) ||
((chdir(cwd)) != 0)) {
log_err("cannot get docroot information (%s)\n", AP_DOC_ROOT);
exit(113);
}
}
So, "desired directory" is either the compiled in docroot or the script
location. I'm assuming that you're not using userdir, so I'd guess that
/home
(as the compiled in docroot) doesn't exist?
nd
---------------------------------------------------------------------
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] SUEXEC
Posted by André Malo <nd...@perlig.de>.
* "Erwin Knobbe" <kn...@chello.nl> wrote:
> Hello,
>
> I am trying to get SUEXEC working on apache 2.x. I use redhat 9. I have
> recompiled the rpm with suexec support.
> When i start apache i can see in the error log that SUEXEC starts up. My
> cgi-bin is in the users home folder ( /home/xxx/cgi-bin)
> But it doesn't work. I get this message when executing a test cgi
> script: -Premature end of script headers: test.cgi
> I get this message in suexec log file: cannot get docroot information
> (/home).
>
> Anyone an idee? I searched google but coulnd't find the right answer.
It typically means, that suexec cannot chdir into the desired directory for
some reason. This is the corresponding code:
if (userdir) {
if (((chdir(target_homedir)) != 0) ||
((chdir(AP_USERDIR_SUFFIX)) != 0) ||
((getcwd(dwd, AP_MAXPATH)) == NULL) ||
((chdir(cwd)) != 0)) {
log_err("cannot get docroot information (%s)\n", target_homedir);
exit(112);
}
}
else {
if (((chdir(AP_DOC_ROOT)) != 0) ||
((getcwd(dwd, AP_MAXPATH)) == NULL) ||
((chdir(cwd)) != 0)) {
log_err("cannot get docroot information (%s)\n", AP_DOC_ROOT);
exit(113);
}
}
So, "desired directory" is either the compiled in docroot or the script
location. I'm assuming that you're not using userdir, so I'd guess that /home
(as the compiled in docroot) doesn't exist?
nd
---------------------------------------------------------------------
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