Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe@cygwin.com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-help@cygwin.com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
Delivered-To: mailing list cygwin@cygwin.com
Message-ID: <2760.205.201.57.23.1025610339.squirrel@mail.burri.to>
Date: Tue, 2 Jul 2002 07:45:39 -0400 (EDT)
Subject: Socket permission problem?
From: "Brian Gallew" <geek@burri.to>
To: <cygwin@cygwin.com>
X-Priority: 3
Importance: Normal
X-MSMail-Priority: Normal
MIME-Version: 1.0
Content-Type: text/plain; charset=iso-8859-1
Content-Transfer-Encoding: 8bit

I've got a Python-language CGI that is trying to connect to a
PostgreSQL database.  Unfortunately, it keeps yielding this traceback:
Traceback (most recent call last):
  File "/var/www/htdocs/index.py", line 9, in ?
    conn = pgdb.connect(host=None,database='software')
  File "/usr/lib/python2.2/site-packages/pgdb.py", line 376, in connect
    user = dbuser, passwd = dbpasswd)
_pg.error: could not create socket: Operation not permitted

[Tue Jul  2 07:31:43 2002] [error] [client 127.0.0.1] Premature end of
script headers: /var/www/htdocs/index.py


Here's my setup info:
Windows XP
CYGWIN=binmode tty ntsec codepage:oem
Apache, Python and PostgreSQL all installed from the latest Cygwin
packages (update my installations pretty much every day).
PostgreSQL is configured to run under userid "geek".
Apache is configured to run under userid "services".

I've made sure that / is mode 555 and /tmp is mode 1777.  If I run an
rxvt as the user "services" I can use psql to access the database just
fine.  I can even run the cgi successfully from such a login.  I've
tried googling for this error and all I get is references to various
bits of source code (not so helpful).  Frankly, I'm stumped.



--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

