Hi - I'm trying to upgrade a 1.3.33 Apache server to 1.3.41 with SuEXEC
and am struggling with SuEXEC, the server is several years old with no
documentation or any of the old software / config logs at all. I've got
Apache installing just fine with suexec but it's the "--suexec-docroot"
+ "--suexec-userdir" I'm struggling with.

The suexec docs & examples are very good but with this particular server
the websites are all under the following directory structure:

/home/[a-z]/[a-z]/username/public_html/ so the same as
/home/*/*/*/public_html/ I suppose.

The docs don't give an example for this kind of setup and I've been
unable to find an example, I thought this would be the correct configure
line for Apache:


./configure --prefix= --enable-module=vhost_alias --enable-module=ssl \
--enable-suexec --suexec-caller=nobody
--suexec-logfile=/var/log/suexec.log \
--suexec-safepath=/bin:/usr/bin --server-uid=nobody --server-gid=nobody
\
--suexec-docroot=home --suexec-userdir=public_html


Server version: Apache/1.3.41 (Unix)
Server built:   Oct 30 2008 13:10:03
Server's Module Magic Number: 19990320:18
Server compiled with....
 -D EAPI
 -D HAVE_MMAP
 -D USE_MMAP_SCOREBOARD
 -D USE_MMAP_FILES
 -D HAVE_FLOCK_SERIALIZED_ACCEPT
 -D SINGLE_LISTEN_UNSERIALIZED_ACCEPT
 -D DYNAMIC_MODULE_LIMIT=64
 -D HARD_SERVER_LIMIT=256
 -D SO_ACCEPTFILTER
 -D ACCEPT_FILTER_NAME="httpready"
 -D HTTPD_ROOT=""
 -D SUEXEC_BIN="/bin/suexec"
 -D DEFAULT_PIDLOG="logs/httpd.pid"
 -D DEFAULT_SCOREBOARD="logs/httpd.scoreboard"
 -D DEFAULT_LOCKFILE="logs/httpd.lock"
 -D DEFAULT_ERRORLOG="logs/error_log"
 -D TYPES_CONFIG_FILE="conf/mime.types"
 -D SERVER_CONFIG_FILE="conf/httpd.conf"
 -D ACCESS_CONFIG_FILE="conf/access.conf"
 -D RESOURCE_CONFIG_FILE="conf/srm.conf"

./suexec -V
 -D DOC_ROOT="/home"
 -D GID_MIN=100
 -D HTTPD_USER="nobody"
 -D LOG_EXEC="/var/log/suexec.log"
 -D SAFE_PATH="/bin:/usr/bin"
 -D UID_MIN=100
 -D USERDIR_SUFFIX="public_html"


But when I try my php test script I get the following in the suexec
logfile:

[2008-10-30 12:36:24]: info: (target/actual) uid: (nobody/nobody) gid:
(sites/sites) cmd: php.cgi
[2008-10-30 12:36:24]: emerg: cannot get docroot information (home)

But home is there ... I checked.

I thought this might be because I didn't put a "/" in front of home for
"--suexec-docroot=home", but when I did the error changed to:

[2008-10-30 13:11:07]: info: (target/actual) uid: (nobody/nobody) gid:
(sites/sites) cmd: php.cgi
[2008-10-30 13:11:07]: error: command not in docroot
(/execscriptdir/php.cgi)

Yes I suppose strictly speaking it is not "in" docroot but it is under
docroot:


So in a last ditch effort I amended "--suexec-docroot=" to be
"--suexec-docroot=/home/*/*/*/" but this causes the "make" of Apache to
fail at this stage:

gcc -c  -I../os/unix -I../include   -funsigned-char -DMOD_SSL=208131
-DEAPI -DUSE_EXPAT -I../lib/expat-lite -DNO_DL_NEEDED
-DHTTPD_USER=\"nobody\"  -DUID_MIN=100  -DGID_MIN=100
-DUSERDIR_SUFFIX=\"public_html\"  -DLOG_EXEC=\"/var/log/suexec.log\"
-DDOC_ROOT=\"/home/a/a/aaabbb/ /home/f/i/fiftyfive/
/home/f/i/fiftytwotest/ /home/t/e/testdon/ /home/t/e/testtest\"
-DSAFE_PATH=\"/bin:/usr/bin\" suexec.c
gcc: /home/t/e/testtest": No such file or directory
suexec.c: In function `main':
suexec.c:277: error: missing terminating " character
suexec.c:277: error: syntax error before ')' token
suexec.c:487: error: missing terminating " character
suexec.c:487: error: too few arguments to function `chdir'
suexec.c:490: error: missing terminating " character
suexec.c:490: error: syntax error before ')' token
*** Error code 1

Stop in /usr/fs/src/apache_1.3.41/src/support.
*** Error code 1

Stop in /usr/fs/src/apache_1.3.41.
*** Error code 1

Stop in /usr/fs/src/apache_1.3.41.



It seems to be expanding out ALL the folders under /home for some
reason? The error about "No such file or directory" is also odd as this
and the ones mentioned before ALL exist.


Any help would be greatly appreciated - Julian.



Julian Grunnell
UNIX Systems Administrator (Leeds)
Webfusion

Tel: 0208 587 7212
Mob: 07803 649593
Web: http://www.webfusion.co.uk/


Reply via email to