Hi all,

While trying to track down another problem in our web app between php and postgresql, I keep running across this error message:

2009-08-28 08:37:39.299833500 local7.err: Aug 28 08:37:39 httpd[22671]: /etc/pwd.db: Inappropriate file type or format

This is nothing new but since I'm tired of beating my head against the "unexpected EOF on client connection" postgresql is getting when php seemingly truncates the transaction and then doesn't send all of the query results to the browser, I thought I'd ask about this.

httpd is chrooted, there is no pwd.db in /var/www/etc, nor would I think there ought to be.

To try and track down my other problem, I ktraced httpd and sure enough, I can see it trying to find first /etc/spwd.db and then /etc/pwd.db just after it loads the page to be displayed.

 19842 httpd    CALL  open(0x2d424eef,0,0)
 19842 httpd    NAMI  "/etc/spwd.db"
 19842 httpd    RET   open 9
 19842 httpd    CALL  fcntl(0x9,0x2,0x1)
 19842 httpd    RET   fcntl 0
 19842 httpd    CALL  fstat(0x9,0xcfbc7bc0)
 19842 httpd    RET   fstat 0
 19842 httpd    CALL  read(0x9,0x7cb2ec00,0x104)
 19842 httpd    RET   read 0
 19842 httpd    CALL  close(0x9)
 19842 httpd    RET   close 0
 19842 httpd    CALL  open(0x2d424efc,0,0)
 19842 httpd    NAMI  "/etc/pwd.db"
 19842 httpd    RET   open 9
 19842 httpd    CALL  fcntl(0x9,0x2,0x1)
 19842 httpd    RET   fcntl 0
 19842 httpd    CALL  fstat(0x9,0xcfbc7bc0)
 19842 httpd    RET   fstat 0
 19842 httpd    CALL  read(0x9,0x7cb2e400,0x104)
 19842 httpd    RET   read 0
 19842 httpd    CALL  close(0x9)

A little further on I see this:

 19842 httpd    CALL  issetugid()
 19842 httpd    RET   issetugid 0
 19842 httpd    CALL  open(0xcfbc6b10,0,0xcfbc6af3)
 19842 httpd    NAMI  "/usr/share/nls/C/libc.cat"
 19842 httpd    RET   open -1 errno 2 No such file or directory
 19842 httpd    CALL  open(0xcfbc6b10,0,0xcfbc6af3)
 19842 httpd    NAMI  "/usr/share/nls/libc/C"
 19842 httpd    RET   open -1 errno 2 No such file or directory
 19842 httpd    CALL  sendto(0x3,0xcfbc7430,0x51,0,0,0)
 19842 httpd    GIO   fd 3 wrote 81 bytes
      "<187>Aug 28 09:03:49 httpd[19842]: /etc/pwd.db: Inappropriate file typ\
e or format"
 19842 httpd    RET   sendto 81/0x51

so we are also looking for a couple of other files that also exist outside the chroot but are not present in it.

These appear just before apache looks for (and finds) resolv.conf and hosts in the chrooted /etc.

So, what's trying to find the spwd.db and pwd.db file and why?

Okay, back to stepping through the rest of the ktrace output looking for my real problem....

Jeff

Reply via email to