delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2002/07/02/07:46:07

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT 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 AT burri DOT to>
To: <cygwin AT cygwin DOT com>
X-Priority: 3
Importance: Normal
X-MSMail-Priority: Normal
MIME-Version: 1.0

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/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019