<NONE>

Sonya Rikhtverchik (rikhtver@OpenMarket.com)
Mon, 18 Aug 1997 14:35:28 -0400

Message-Id: <199708181835.OAA01119@u4-138.openmarket.com>
To: fastcgi-developers@OpenMarket.com
Date: Mon, 18 Aug 1997 14:35:28 -0400
From: Sonya Rikhtverchik <rikhtver@OpenMarket.com>
Subject: <NONE>

Date: Mon, 18 Aug 1997 14:25:07 -0400 (EDT)
Message-Id: <OAA25765.199708181825@catapult.va.pubnix.com>
From: "David J. MacKenzie" <djm@va.pubnix.com>
To: fastcgi-developers@openmarket.com
cc: djm@va.pubnix.com
Subject: bug fixes for apache-fastcgi-2.0b1 
X-Tom-Swiftie: "Ed is the Standard Text Editor," Tom sed.

[I am not on this mailing list, so cc me on any replies; this is the
closest thing to a bug reporting address I could find for mod_fcgi.]

I tried the new beta mod_fastcgi with apache 1.2.1.  It fails to work
at all, because it creates the "dynamic" dir and "mbox" as root, with
restrictive permissions, and then it checks to see whether the user
specified in the User and Group directives has read, write, and
execute permissions on them.  The user doesn't, because they look like:

root@ungoliant 131 $ ls -la /tmp/dynamic/
total 2
drwxr--r--  2 root  wheel   512 Aug 18 13:15 ./
drwxrwxrwt  3 root  wheel  1024 Aug 18 14:11 ../
- -rw-------  1 root  wheel     0 Aug 18 13:15 mbox

Here's how I got it to work.  I had to give each user their own
FastCgiIpcDir that they own.  If you want more than one user to be
able to share a FastCgiIpcDir, e.g. the default in /tmp, then you
mustn't create it with restrictive permissions.

- --- mod_fastcgi.c	1997/08/15 23:52:37	1.1
+++ mod_fastcgi.c	1997/08/18 18:12:50
@@ -2162,6 +2162,7 @@
 	    return "Unable to create \"dynamic\" subdirectory";
 	}
     }
+    chown(ipcDynamicDir, uid, gid);
 DoMbox:
     /* delete everything in the directory */
     dpentry = Malloc(strlen(ipcDynamicDir)+255);
@@ -2187,6 +2188,7 @@
         return
             "Unable to create mbox file in dynamic subdirectory";
     }
+    fchown(fd, uid, gid);
     close(fd);
     return NULL;
 }

------- End of Forwarded Message