Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com Date: Mon, 15 Mar 2004 08:36:56 -0500 From: Jason Tishler To: cygwin AT cygwin DOT com, "Jason B. Alonso" Subject: Re: WinXP Pro and PostgreSQL Message-ID: <20040315133656.GB2324@tishler.net> Mail-Followup-To: cygwin AT cygwin DOT com, "Jason B. Alonso" References: <20040314014050 DOT GA4180 AT jacobian DOT MIT DOT EDU> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20040314014050.GA4180@jacobian.MIT.EDU> User-Agent: Mutt/1.4i X-IsSubscribed: yes Jason, On Sat, Mar 13, 2004 at 08:40:50PM -0500, Jason B. Alonso wrote: > I know this has appeared several times on this list, but it never > seems to be addressed with perfection... > > initializing pg_shadow... FATAL: /usr/bin/postgres: could not locate > postgres executable > > ... is a bug that appears on WinXP Pro but not on Win2K. The optimal > quick fix is: "chown postgres /usr/bin/postgres.exe" as an > administrator and try again. > > For the hackers out there, notice that "/usr/bin/postgres -D /somedir" > fails with the same error when running as user postgres, but only when > the -boot option is removed (a feature in the initdb script, which is > indicated by the fact that this error does not appear on previous > steps of initdb). > > Perhaps the quick fix will lead to some sort of resolution, but it > most certainly needs to appear in the Cygwin-README for postgresql! AFAICT, this is a general issue with Cygwin's setup.exe that can affect more than just PostgreSQL. I have attempt to resolve this issue before. Please search the archives, if interested in the details. Due to a hard disk crash, I recently had the opportunity to install Cygwin under XP for the first time. I found that all files and directories had a mode of 000 (with some extra ACLs). I presume this kind of wacky permissions would confuse many Unix programs in addition to PostgreSQL. Since this was a work PC, it is possible that my company's IT security had tightened the permissions more than what is typical. Nevertheless, in my experience helping many XP PostgreSQL users, I have commonly found permissions of 700 and 770. These kinds of permissions can cause many Unix apps to fails -- for example, logging in via ssh. Anyway, I have empirically found the following workaround that seems to solve these kinds of permissions related problems: 1. Create a Cygwin installation directory before running setup.exe (e.g., C:\Cygwin) 2. Using Windows Explorer, add the following ACLs to the Cygwin installation directory: a. Everyone (allow Read & Execute, List Folder Contents, Read) b. your logname or Administrator (allow Full Control) 3. Direct setup.exe to install into the Cygwin installation directory Note that 2a produces permissions of 555 and 2b produces 700, so the combination produces 755. YMMV, but the above worked very well for me. 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 -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/