Cannot get CGIs working and issue with multilog
"Dale Gallagher" <[email protected]> Wed, 18 Feb 2004 19:41:22 +0200
| Newsgroups | gmane.comp.web.fnord |
|---|---|
| Message-ID | <[email protected]> |
Hi there
I tried fnord a while back and had absolutely no
problems in setting it up - am an experienced
daemontools/ucspi-tcp user. Serving plain HTML
is fine, though I cannot get logging and CGI to
work.
# cat /etc/fnord/service/run
DOCROOT=`head -1 /etc/fnord/env/DOCROOT`
USER=`head -1 /etc/fnord/env/USER`
cd $DOCROOT
exec envuidgid $USER tcpserver -RHl localhost 0 80
/usr/local/sbin/fnord 2>&1
# cat /etc/fnord/service/log/run
#!/bin/sh
LOGUSER=`head -1 /etc/fnord/env/LOGUSER`
exec setuidgid $LOGUSER multilog t /var/log/fnord
multilog error is:
multilog: fatal: unable to switch to current \
directory: access denied
$ cat /etc/passwd | grep fnord
fnord:x:2005:2004::/dev/null:/usr/bin/false
fnordlog:x:2006:2004::/dev/null:/usr/bin/false
$ cat /etc/group | grep fnord
fnord:x:2004:
$ ls -l /var/log | grep fnord
drwxr-x--- 2 fnordlog fnord 4096 Feb 17 14:02 fnord/
Also, CGIs return 404 when run - I uncommented
#define CGI in httpd.c before compiling.
Test CGI script used:
#!/usr/bin/perl
print "Content-type: text/html\n\n<html>cgi ok</html>"
Any pointers? Have I blatantly omitted something and
deserve a beating?
System info:
GCC 3.2.3
dietlibc-0.24
fnord-1.8
Thanks
Dale