Re: Problems with permissions after CYGWIN upgrade

Lists: pgsql-cygwin
From: David R Robison <drrobison(at)openroadsconsulting(dot)com>
To: pgsql-cygwin(at)postgresql(dot)org
Subject: Problems with permissions after CYGWIN upgrade
Date: 2003-03-19 14:29:19
Message-ID: 1048084159.3e787ebfb9c36@www.openroadsconsulting.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-cygwin

I just upgraded to the latest version of cygwin and now I am unable to connect
to the postgres database except from the "postgres" account (I am running
Windows 2000).

When I try to connect with psql from my normal account, I get the following error:

psql: could not connect to server: Bad file descriptor
Is the server running locally and accepting
connections on Unix domain socket "/tmp/.s.PGSQL.5432"?

The file permissions in /tmp are:

total 5512
drwxrwxrwx+ 2 Administ None 4096 Mar 19 08:57 .
drwxrwxrwx+ 9 Administ None 4096 Dec 12 12:59 ..
-rwx------ 1 ???????? None 51 Mar 19 08:57 .s.PGSQL.5432
-rw------- 1 ???????? None 31 Mar 19 08:57 .s.PGSQL.5432.lock
-rw-rw-rw- 1 SYSTEM SYSTEM 3916520 Mar 19 08:56 MultiFileMsg
-rw-rw-rw- 1 SYSTEM SYSTEM 22032 Mar 19 08:56 MultiFileSem
-rw-rw-rw- 1 SYSTEM SYSTEM 202768 Mar 19 08:56 MultiFileShm
-rw------- 1 ???????? None 1499136 Mar 19 08:57 cygipc_0

Everything use to work file. Any ideas on what might have changed, what the
problem is, or how to work around it?

Thanks,

David Robison


From: David R Robison <drrobison(at)openroadsconsulting(dot)com>
To: David R Robison <drrobison(at)openroadsconsulting(dot)com>
Cc: pgsql-cygwin(at)postgresql(dot)org
Subject: Re: Problems with permissions after CYGWIN upgrade
Date: 2003-03-19 15:02:18
Message-ID: 1048086138.3e78867a8dd71@www.openroadsconsulting.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-cygwin

I added postgres to the /etc/passwd file and it took care of the question marks
on the directory listing, however, I still cannot connect to postgres except
from the postgres account.

Thanks,
David Robison

Quoting David R Robison <drrobison(at)openroadsconsulting(dot)com>:

> I just upgraded to the latest version of cygwin and now I am unable to
> connect
> to the postgres database except from the "postgres" account (I am
> running
> Windows 2000).
>
> When I try to connect with psql from my normal account, I get the
> following error:
>
> psql: could not connect to server: Bad file descriptor
> Is the server running locally and accepting
> connections on Unix domain socket "/tmp/.s.PGSQL.5432"?
>
> The file permissions in /tmp are:
>
> total 5512
> drwxrwxrwx+ 2 Administ None 4096 Mar 19 08:57 .
> drwxrwxrwx+ 9 Administ None 4096 Dec 12 12:59 ..
> -rwx------ 1 ???????? None 51 Mar 19 08:57 .s.PGSQL.5432
> -rw------- 1 ???????? None 31 Mar 19 08:57
> .s.PGSQL.5432.lock
> -rw-rw-rw- 1 SYSTEM SYSTEM 3916520 Mar 19 08:56 MultiFileMsg
> -rw-rw-rw- 1 SYSTEM SYSTEM 22032 Mar 19 08:56 MultiFileSem
> -rw-rw-rw- 1 SYSTEM SYSTEM 202768 Mar 19 08:56 MultiFileShm
> -rw------- 1 ???????? None 1499136 Mar 19 08:57 cygipc_0
>
> Everything use to work file. Any ideas on what might have changed, what
> the
> problem is, or how to work around it?
>
> Thanks,
>
> David Robison
>
> ---------------------------(end of
> broadcast)---------------------------
> TIP 1: subscribe and unsubscribe commands go to
> majordomo(at)postgresql(dot)org
>


From: Jason Tishler <jason(at)tishler(dot)net>
To: David R Robison <drrobison(at)openroadsconsulting(dot)com>
Cc: pgsql-cygwin(at)postgresql(dot)org
Subject: Re: Problems with permissions after CYGWIN upgrade
Date: 2003-03-19 17:43:40
Message-ID: 20030319174340.GD2536@tishler.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-cygwin

On Wed, Mar 19, 2003 at 09:29:19AM -0500, David R Robison wrote:
> The file permissions in /tmp are:
>
> total 5512
> drwxrwxrwx+ 2 Administ None 4096 Mar 19 08:57 .
> drwxrwxrwx+ 9 Administ None 4096 Dec 12 12:59 ..
> -rwx------ 1 ???????? None 51 Mar 19 08:57 .s.PGSQL.5432
^
*
> -rw------- 1 ???????? None 31 Mar 19 08:57 .s.PGSQL.5432.lock
> [snip]
>
> Everything use to work file. Any ideas on what might have changed,
> what the problem is, or how to work around it?

I get the following:

ls -l /tmp/.s.PGSQL.5432*
srwx------ 1 postgres None 0 Mar 19 12:18 /tmp/.s.PGSQL.5432
-rw------- 1 postgres None 32 Mar 19 12:18 /tmp/.s.PGSQL.5432.lock

It appears that your /tmp/.s.PGSQL.5432 is not considered a socket.
Sorry, but I don't know why.

Jason

--
PGP/GPG Key: http://www.tishler.net/jason/pubkey.asc or key servers
Fingerprint: 7A73 1405 7F2B E669 C19D 8784 1AFD E4CC ECF4 8EF6


From: "David R Robison" <drrobison(at)openroadsconsulting(dot)com>
To: "'Jason Tishler'" <jason(at)tishler(dot)net>
Cc: <pgsql-cygwin(at)postgresql(dot)org>
Subject: Re: Problems with permissions after CYGWIN upgrade
Date: 2003-03-19 17:56:32
Message-ID: 000201c2ee40$e0709f30$0864a8c0@D901K911
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-cygwin

If I change the permissions on the files to 777 then it works fine. Any
ideas?

David R Robison
Open Roads Consulting, Inc.
http://www.openroadsconsulting.com

-----Original Message-----
From: Jason Tishler [mailto:jason(at)tishler(dot)net]
Sent: Wednesday, March 19, 2003 12:44 PM
To: David R Robison
Cc: pgsql-cygwin(at)postgresql(dot)org
Subject: Re: [CYGWIN] Problems with permissions after CYGWIN upgrade

On Wed, Mar 19, 2003 at 09:29:19AM -0500, David R Robison wrote:
> The file permissions in /tmp are:
>
> total 5512
> drwxrwxrwx+ 2 Administ None 4096 Mar 19 08:57 .
> drwxrwxrwx+ 9 Administ None 4096 Dec 12 12:59 ..
> -rwx------ 1 ???????? None 51 Mar 19 08:57 .s.PGSQL.5432
^
*
> -rw------- 1 ???????? None 31 Mar 19 08:57
.s.PGSQL.5432.lock
> [snip]
>
> Everything use to work file. Any ideas on what might have changed,
> what the problem is, or how to work around it?

I get the following:

ls -l /tmp/.s.PGSQL.5432*
srwx------ 1 postgres None 0 Mar 19 12:18
/tmp/.s.PGSQL.5432
-rw------- 1 postgres None 32 Mar 19 12:18
/tmp/.s.PGSQL.5432.lock

It appears that your /tmp/.s.PGSQL.5432 is not considered a socket.
Sorry, but I don't know why.

Jason

--
PGP/GPG Key: http://www.tishler.net/jason/pubkey.asc or key servers
Fingerprint: 7A73 1405 7F2B E669 C19D 8784 1AFD E4CC ECF4 8EF6


From: Jason Tishler <jason(at)tishler(dot)net>
To: David R Robison <drrobison(at)openroadsconsulting(dot)com>
Cc: pgsql-cygwin(at)postgresql(dot)org
Subject: Re: Problems with permissions after CYGWIN upgrade
Date: 2003-03-19 21:15:10
Message-ID: 20030319211510.GB1116@tishler.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-cygwin

David,

On Wed, Mar 19, 2003 at 12:56:32PM -0500, David R Robison wrote:
> Any ideas?

Yes, recent Cygwin versions (sometime after 1.3.18) has a chmod() bug:

http://cygwin.com/ml/cygwin/2003-03/msg01344.html

What Cygwin version are you using?

> If I change the permissions on the files to 777 then it works fine.

AFAICT, chmod() on sockets has no affect:

$ ls -l /tmp/.afunix
srwx------ 1 jt Domain U 0 Mar 19 15:57 /tmp/.afunix
$ chmod 0777 .afunix
$ ls -l /tmp/.afunix
srwx------ 1 jt Domain U 0 Mar 19 15:57 /tmp/.afunix

How did you get chmod to work?

Jason

--
PGP/GPG Key: http://www.tishler.net/jason/pubkey.asc or key servers
Fingerprint: 7A73 1405 7F2B E669 C19D 8784 1AFD E4CC ECF4 8EF6


From: Jason Tishler <jason(at)tishler(dot)net>
To: David R Robison <drrobison(at)openroadsconsulting(dot)com>, pgsql-cygwin(at)postgresql(dot)org
Subject: Re: Problems with permissions after CYGWIN upgrade
Date: 2003-03-20 13:04:06
Message-ID: 20030320130406.GC1420@tishler.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-cygwin

David,

On Wed, Mar 19, 2003 at 04:15:10PM -0500, Jason Tishler wrote:
> On Wed, Mar 19, 2003 at 12:56:32PM -0500, David R Robison wrote:
> > Any ideas?
>
> Yes, recent Cygwin versions (sometime after 1.3.18) has a chmod() bug:
>
> http://cygwin.com/ml/cygwin/2003-03/msg01344.html

The above bug has been fixed in Cygwin CVS:

http://cygwin.com/ml/cygwin-cvs/2003-q1/msg00397.html

However, a Cygwin snapshot does not exist yet that contains the above
change. So, you will have to either build your own Cygwin DLL from CVS
or using IP sockets (i.e., postmaster -i) in the meantime.

Jason

--
PGP/GPG Key: http://www.tishler.net/jason/pubkey.asc or key servers
Fingerprint: 7A73 1405 7F2B E669 C19D 8784 1AFD E4CC ECF4 8EF6