This is the mail archive of the cygwin@cygwin.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Socket permission problem?


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/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]