initdb failure with PostgreSQL 7.3.2 / Cygwin 1.3.22-1 / CypIPC 1.13.2-1 / Windows XP Pro - Mailing list pgsql-cygwin

From Frank Seesink
Subject initdb failure with PostgreSQL 7.3.2 / Cygwin 1.3.22-1 / CypIPC 1.13.2-1 / Windows XP Pro
Date
Msg-id b8ov4n$sgq$1@main.gmane.org
Whole thread Raw
Responses Re: initdb failure with PostgreSQL 7.3.2 / Cygwin 1.3.22-1 /
List pgsql-cygwin
[2nd posting, as 1st never reached list due to non-membership.  Now a
member, so hoping it will post quickly. Apologies in advance for
duplication if 1st post ever makes it.]

NOTE:  This is a long message, however most are screen copy/pastes which
can be skimmed over.  I have taken great pains to document the steps
clearly, so as to prevent confusion.  If I have left out anything,
please advise.  Unless otherwise noted, commands are done running as a
user who is a member of the NT Administrators group.  (I have removed
1st line of BASH shell prompt for easier reading.)

For the past few weeks, I have been trying to get PostgreSQL 7.3.2
installed as an NT service using the usual methods.  Please note I have
done this in the past, under Windows 2000, using various versions of
PostgreSQL (7.1 and 7.2.1 come to mind), so I am familiar with the
steps.  Unfortunately, now I am running into difficulty, and after
having read this newsgroup, as well the usual Google searches, I have
come to the gut conclusion that the latest release revs of Cygwin appear
to have some kind of permission issue, possibly related to what I've
read about 'ntsec' being turned on by default in recent versions.
Unfortunately, I cannot track down the culprit.  So I am asking for any
and all help in determining what various file/directory permissions need
to be.

Please note this problem has occurred on multiple PCs now, both running
Windows 2000 and Windows XP Pro.  The following was my last attempt,
documented step-for-step, so you can see what I have done.

HARDWARE:
    Windows XP Professional SP1
       with all updates thru today (29Apr2003)
    Intel PIII 866MHz CPU
    512MB SDRAM
    20GB HD (approx. 5GB free) / one NTFS partition (C:)

* Completely removed Cygwin from PC:
    * Removed C:\cygwin directory tree
    * Removed 'HKLM\Software\Cygnus Solutions' Registry key
    * Removed 'HKCU\Software\Cygnus Solutions' Registry key
    * Removed CYGWIN environment variable (and rebooted)
    * Left NT user 'postgres' (member of 'Users' group only)
    * Left Local Security Policy setting that allowed
      NT user 'postgres' to 'Log on as a service'
    * Left PATH environment variable listing 'C:\cygwin\bin'
      Beginning of PATH looks as follows:
    "C:\Perl\bin\;C:\WINDOWS\system32;C:\WINDOWS;C:\Cygwin\bin;..."

      NOTE:  ActiveState ActivePerl v5.8.0.806 is located in
             c:\Perl, in case it matters.

I have a local server mirroring a Cygwin mirror site (RCN), so my
install is done via a Windows share that is mapped to a drive letter
(i.e., install from local directory).

CYGWIN VERSION INFO:
    Cygwin setup.exe v2.340.2.5
    Cygwin           v1.3.22-1
    CygIPC           v1.13.2-1
    PostgreSQL       v7.3.2 (as packaged in Cygwin distribution)

* Logged in as user with Administrative Rights.
* Ran cygwin setup.exe, disabled virus scanner (McAfee), installed from
   local directory, and did a FULL install (EVERYTHING) vs. the default.
   Didn't want issues of missing packages, etc., and I've got the HD
   space.

* Once installed, ran BASH shell and did following (to show
   permissions):
______________________________________________________________________
$ ls -al
total 2
drwxrwx---+  10 Frank    Users           0 Apr 29 11:06 .
drwxrwx---+  10 Frank    Users           0 Apr 29 11:06 ..
drwxrwx---+   3 Frank    Users           0 Apr 29 11:05 bin
-rwxr-x---+   1 Frank    Users          57 Apr 29 11:02 cygwin.bat
-rwxr-x---+   1 Frank    Users         766 Apr 29 11:02 cygwin.ico
drwxrwx---+  19 Frank    Users           0 Apr 29 11:05 etc
drwxrwxrwx+   3 Frank    None            0 Apr 29 11:06 home
drwxrwx---+  27 Frank    Users           0 Apr 29 11:05 lib
drwxrwx---+   2 Frank    Users           0 Apr 29 10:51 sbin
drwxrwx---+   3 Frank    Users           0 Apr 29 11:07 tmp
drwxrwx---+  23 Frank    Users           0 Apr 29 11:03 usr
drwxrwx---+   9 Frank    Users           0 Apr 29 11:03 var
______________________________________________________________________

* As indicated in various posts, /tmp should be writable by all, so
   did

$ chmod 777 /tmp

* Then, to verify, did...
______________________________________________________________________
$ ls -al
total 2
drwxrwx---+  10 Frank    Users           0 Apr 29 11:06 .
drwxrwx---+  10 Frank    Users           0 Apr 29 11:06 ..
drwxrwx---+   3 Frank    Users           0 Apr 29 11:05 bin
-rwxr-x---+   1 Frank    Users          57 Apr 29 11:02 cygwin.bat
-rwxr-x---+   1 Frank    Users         766 Apr 29 11:02 cygwin.ico
drwxrwx---+  19 Frank    Users           0 Apr 29 11:05 etc
drwxrwxrwx+   3 Frank    None            0 Apr 29 11:06 home
drwxrwx---+  27 Frank    Users           0 Apr 29 11:05 lib
drwxrwx---+   2 Frank    Users           0 Apr 29 10:51 sbin
drwxrwxrwx+   2 Frank    Users           0 Apr 29 11:38 tmp
drwxrwx---+  23 Frank    Users           0 Apr 29 11:03 usr
drwxrwx---+   9 Frank    Users           0 Apr 29 11:03 var
______________________________________________________________________

* Using Windows Explorer, copied over cygipc-1.13-2.tar.bz2 into /tmp
   by dropping file in C:\cygwin\tmp.

* As documented on cygipc site at
http://www.neuro.gatech.edu/users/cwilson/cygutils/how_to_install.html

   Entered the following commands to install cygipc:
______________________________________________________________________
$ cd /
$ bunzip2 -c /tmp/CygIPC/v1.13-2/cygipc-1.13-2.tar.bz2 | tar xvf -
usr/
usr/local/
usr/local/bin/
usr/local/bin/ipc-daemon.exe
usr/local/bin/ipck
usr/local/bin/ipcrm.exe
usr/local/bin/ipcs.exe
usr/local/bin/ipctest.exe
usr/local/doc/
usr/local/doc/cygipc-1.13/
usr/local/doc/cygipc-1.13/ChangeLog
usr/local/doc/cygipc-1.13/contents_motif.gif
usr/local/doc/cygipc-1.13/COPYING
usr/local/doc/cygipc-1.13/index.html
usr/local/doc/cygipc-1.13/NEWS
usr/local/doc/cygipc-1.13/next_motif.gif
usr/local/doc/cygipc-1.13/node21.html
...[clip]...
usr/local/doc/cygipc-1.13/node81.html
usr/local/doc/cygipc-1.13/previous_motif.gif
usr/local/doc/cygipc-1.13/README
usr/local/doc/cygipc-1.13/README.old
usr/local/doc/cygipc-1.13/TODO
usr/local/doc/cygipc-1.13/up_motif.gif
usr/local/doc/cygipc-1.13/USAGE
usr/local/doc/Cygwin/
usr/local/include/
usr/local/include/sys/
usr/local/include/sys/ipc.h
usr/local/include/sys/ipctrace.h
usr/local/include/sys/msg.h
usr/local/include/sys/sem.h
usr/local/include/sys/shm.h
usr/local/lib/
usr/local/lib/libcygipc.a
______________________________________________________________________

* Using the document: /usr/doc/cygwin/postgresql-7.3.2.README

   Followed the steps for NT service as indicated under section headed
   with "The following is the NT services Cygwin PostgreSQL
   installation procedure"

1. $ ipc-daemon --install-as-service
    [Copy/pasted...worked fine]

    NOTE:  Double-checked, and NT service "Cygwin IPC Daemon" is set
           to 'Automatic' and will Log On As 'Local System'.

2. NT user 'postgres' already existed prior to Cygwin install, so I
    assume this was not necessary.  Looking in /etc/passwd, I see the
    account listed.

    NOTE:  Interesting observation.  I notice if you do a
           'mkpasswd -g' and just look at the output on the screen,
           the format shown does NOT match what is in the /etc/group
           file.  Specifically, the GUID indicated by mkpasswd is
           what you'd expect in Unix, but the /etc/group file shows
           NT SUID-RIDs. I ran into this when I tried making changes
           at one point (prior to ripping Cygwin completely off box,
           so should not affect this here), and the result was that
           directory listings showed goofed up group settings.
           Not sure if this plays into the new default behavior of
           'ntsec' being turned on.

3.  Already done, but to make sure, I removed and re-added user 'postgres'.

4.  $ cygrunsrv --install postmaster --path /usr/bin/postmaster --args
"-D /usr/share/postgresql/data -i" --dep ipc-daemon --termsig INT --user
postgres --shutdown
     [Copy/pasted from instructions into BASH shell, and worked fine.]

    NOTE:  Double-checked, and NT service 'postmaster' is set to
           'Automatic' and will Log On As '.\postgres'

5.  $ mkdir /usr/share/postgresql/data
     [Copy/pasted...worked fine.]

6.  $ chown postgres /usr/share/postgresql/data
     [Copy/pasted...worked fine.]

7.  [Copy/pasted...worked fine...got the following:]
     __________________________________________________________________

     $ net start ipc-daemon
     The Cygwin IPC Daemon service is starting.
     The Cygwin IPC Daemon service was started successfully.
     __________________________________________________________________

8.  [To do this step, I closed the BASH shell (to be safe), did a
     Log Off/Switch User, logged in as user 'postgres', ran the
     commands, and copy/pasted the following to a file:
___________________________________________________________________
postgres@SEESINK ~
$ initdb -D /usr/share/postgresql/data
The files belonging to this database system will be owned by user
"postgres".
This user must also own the server process.

The database cluster will be initialized with locale C.

Fixing permissions on existing directory /usr/share/postgresql/data... ok
creating directory /usr/share/postgresql/data/base... ok
creating directory /usr/share/postgresql/data/global... ok
creating directory /usr/share/postgresql/data/pg_xlog... ok
creating directory /usr/share/postgresql/data/pg_clog... ok
creating template1 database in /usr/share/postgresql/data/base/1...
IpcSemaphore
Create: semget(key=1, num=17, 03600) failed: Function not implemented

initdb failed.
______________________________________________________________________

* Logging off from user 'postgres' and logging back in as administrator,
   I performed the following:
______________________________________________________________________
$ cd /usr/share/postgresql
$ ls -al
total 317
drwxrwx---+   5 Frank    Users           0 Apr 29 12:07 .
drwxrwx---+  43 Frank    Users           0 Apr 29 11:02 ..
drwxrwx---+   2 Frank    Users           0 Apr 29 10:50 contrib
-rwxr-x---+   1 Frank    Users       38176 Feb 18 11:14
conversion_create.sql
drwx------+   2 postgres None            0 Apr 29 12:15 data
drwxrwx---+   2 Frank    Users           0 Apr 29 10:50 java
-rwxr-x---+   1 Frank    Users        2329 Feb 18 11:14 pg_hba.conf.sample
-rwxr-x---+   1 Frank    Users        1441 Feb 18 11:14 pg_ident.conf.sample
-rwxr-x---+   1 Frank    Users      225491 Feb 18 11:14 postgres.bki
-rwxr-x---+   1 Frank    Users       48627 Feb 18 11:14 postgres.description
-rwxr-x---+   1 Frank    Users        5043 Feb 18 11:14
postgresql.conf.sample
______________________________________________________________________

* In order to delete the /usr/share/postgresql/data folder, I need to
   reset the owner (as the permissions are for user 'postgres' ONLY.
   Once deleted, I recreate the directory again to make another attempt.
______________________________________________________________________
$ chown -R Frank:Users data
$ cd data
$ ls -al
total 1
drwx------+   6 Frank    Users           0 Apr 29 12:15 .
drwxrwx---+   5 Frank    Users           0 Apr 29 12:07 ..
-rw-------    1 Frank    Users           4 Apr 29 12:15 PG_VERSION
drwx------+   3 Frank    Users           0 Apr 29 12:15 base
drwx------+   2 Frank    Users           0 Apr 29 12:15 global
drwx------+   2 Frank    Users           0 Apr 29 12:15 pg_clog
drwx------+   2 Frank    Users           0 Apr 29 12:15 pg_xlog

$ rm -rf *
$ cd ..
$ rmdir data
$ cd
$ mkdir /usr/share/postgresql/data
______________________________________________________________________

* This time, I'll stay logged in as the administrator, making NO
   changes whatsoever, to demonstrate that the problem appears to be
   permissions-related (as this will succeed as shown):
______________________________________________________________________
$ initdb -D /usr/share/postgresql/data
The files belonging to this database system will be owned by user "Frank".
This user must also own the server process.

The database cluster will be initialized with locale C.

Fixing permissions on existing directory /usr/share/postgresql/data... ok
creating directory /usr/share/postgresql/data/base... ok
creating directory /usr/share/postgresql/data/global... ok
creating directory /usr/share/postgresql/data/pg_xlog... ok
creating directory /usr/share/postgresql/data/pg_clog... ok
creating template1 database in /usr/share/postgresql/data/base/1... ok
creating configuration files... ok
initializing pg_shadow... ok
enabling unlimited row size for system tables... ok
initializing pg_depend... ok
creating system views... ok
loading pg_description... ok
creating conversions... ok
setting privileges on built-in objects... ok
vacuuming database template1... ok
copying template1 to template0... ok

Success. You can now start the database server using:

     /usr/bin/postmaster -D /usr/share/postgresql/data
or
     /usr/bin/pg_ctl -D /usr/share/postgresql/data -l logfile start
______________________________________________________________________

* TADA!  As the NT Administrator used to install Cygwin, this works.

* Having read in various posts that permissions appear to be mangled,
   not only with /tmp, but also with /usr/bin, I decided to take a
   look (only showing portion, but rest looks the same):
______________________________________________________________________
$ cd /usr/bin
$ ls -al
...
-rwxr-x---+   1 Frank    Users     1981952 Feb 18 11:15 postgres.exe
lrwxrwxrwx    1 Frank    Users          23 Apr 29 10:50 postmaster ->
postgres.e
xe
-rwxr-x---+   1 Frank    Users       16896 Feb 24 00:04 ppm2tiff.exe
-rwxr-x---+   1 Frank    Users       66560 Feb 18 11:15 pq.dll
-rwxr-x---+   1 Frank    Users       32768 Feb 19  2002 pr.exe
-rwxr-x---+   1 Frank    Users       90112 Dec 16 13:03 pre-grohtml.exe
-rwxr-x---+   1 Frank    Users         206 Oct 26  2002 printafm
-rwxr-x---+   1 Frank    Users       23040 Jan  7 00:49 printenv.exe
-rwxr-x---+   1 Frank    Users       30720 Jan  7 00:49 printf.exe
-rwxr-x---+   1 Frank    Users       39592 Sep 20  2002 prockill.exe
-rwxr-x---+   1 Frank    Users       61952 Aug 19  2002 procmail.exe
-rwxr-x---+   1 Frank    Users       74752 Sep 20  2002 procps.exe
-rwxr-x---+   1 Frank    Users       19456 Mar 18 09:21 ps.exe
-rwxr-x---+   1 Frank    Users         640 Oct 26  2002 ps2ascii
-rwxr-x---+   1 Frank    Users        1740 Oct 26  2002 ps2epsi
-rwxr-x---+   1 Frank    Users         229 Mar  5 15:13 ps2frag
-rwxr-x---+   1 Frank    Users         211 Oct 26  2002 ps2pdf
-rwxr-x---+   1 Frank    Users         173 Oct 26  2002 ps2pdf12
-rwxr-x---+   1 Frank    Users         173 Oct 26  2002 ps2pdf13
-rwxr-x---+   1 Frank    Users         173 Oct 26  2002 ps2pdf14
-rwxr-x---+   1 Frank    Users         899 Oct 26  2002 ps2pdfwr
-rwxr-x---+   1 Frank    Users      105472 Mar  5 15:13 ps2pk.exe
-rwxr-x---+   1 Frank    Users         373 Oct 26  2002 ps2ps
-rwxr-x---+   1 Frank    Users       52697 Mar 30 12:18 psed
-rwxr-x---+   1 Frank    Users         980 Mar  5 15:13 pslatex
-rwxr-x---+   1 Frank    Users      140288 Feb 18 11:15 psql.exe
...
______________________________________________________________________

* As seen above, /usr/bin/ is set so only the owner and group have
   execute permission.  As Jason Tishler has noted several times, one
   possibility is setting execute permissions for all.  So I did this:
______________________________________________________________________
$ chmod a+rx /usr/bin /usr/bin/*
chmod: changing permissions of `/usr/bin/amstex': No such file or directory
chmod: changing permissions of `/usr/bin/csh': No such file or directory
chmod: changing permissions of `/usr/bin/egrep': No such file or directory
chmod: changing permissions of `/usr/bin/elatex': No such file or directory
chmod: changing permissions of `/usr/bin/fgrep': No such file or directory
chmod: changing permissions of `/usr/bin/jadetex': No such file or directory
chmod: changing permissions of `/usr/bin/lambda': No such file or directory
chmod: changing permissions of `/usr/bin/mcedit': No such file or directory
chmod: changing permissions of `/usr/bin/mcview': No such file or directory
chmod: changing permissions of `/usr/bin/pdfelatex': No such file or
directory
chmod: changing permissions of `/usr/bin/pdfjadetex': No such file or
directory
chmod: changing permissions of `/usr/bin/pdflatex': No such file or
directory
chmod: getting attributes of `/usr/bin/pidof': No such file or directory
chmod: changing permissions of `/usr/bin/virmf': No such file or directory
______________________________________________________________________

* Checking /usr/bin again:
______________________________________________________________________
$ cd /usr/bin
$ ls -al
...
-rwxr-xr-x+   1 Frank    Users     1981952 Feb 18 11:15 postgres.exe
lrwxrwxrwx    1 Frank    Users          23 Apr 29 10:50 postmaster ->
postgres.e
xe
-rwxr-xr-x+   1 Frank    Users       16896 Feb 24 00:04 ppm2tiff.exe
-rwxr-xr-x+   1 Frank    Users       66560 Feb 18 11:15 pq.dll
-rwxr-xr-x+   1 Frank    Users       32768 Feb 19  2002 pr.exe
-rwxr-xr-x+   1 Frank    Users       90112 Dec 16 13:03 pre-grohtml.exe
-rwxr-xr-x+   1 Frank    Users         206 Oct 26  2002 printafm
-rwxr-xr-x+   1 Frank    Users       23040 Jan  7 00:49 printenv.exe
-rwxr-xr-x+   1 Frank    Users       30720 Jan  7 00:49 printf.exe
-rwxr-xr-x+   1 Frank    Users       39592 Sep 20  2002 prockill.exe
-rwxr-xr-x+   1 Frank    Users       61952 Aug 19  2002 procmail.exe
-rwxr-xr-x+   1 Frank    Users       74752 Sep 20  2002 procps.exe
-rwxr-xr-x+   1 Frank    Users       19456 Mar 18 09:21 ps.exe
-rwxr-xr-x+   1 Frank    Users         640 Oct 26  2002 ps2ascii
-rwxr-xr-x+   1 Frank    Users        1740 Oct 26  2002 ps2epsi
-rwxr-xr-x+   1 Frank    Users         229 Mar  5 15:13 ps2frag
-rwxr-xr-x+   1 Frank    Users         211 Oct 26  2002 ps2pdf
-rwxr-xr-x+   1 Frank    Users         173 Oct 26  2002 ps2pdf12
-rwxr-xr-x+   1 Frank    Users         173 Oct 26  2002 ps2pdf13
-rwxr-xr-x+   1 Frank    Users         173 Oct 26  2002 ps2pdf14
-rwxr-xr-x+   1 Frank    Users         899 Oct 26  2002 ps2pdfwr
-rwxr-xr-x+   1 Frank    Users      105472 Mar  5 15:13 ps2pk.exe
-rwxr-xr-x+   1 Frank    Users         373 Oct 26  2002 ps2ps
-rwxr-xr-x+   1 Frank    Users       52697 Mar 30 12:18 psed
-rwxr-xr-x+   1 Frank    Users         980 Mar  5 15:13 pslatex
-rwxr-xr-x+   1 Frank    Users      140288 Feb 18 11:15 psql.exe
...
______________________________________________________________________

* Next up, let's look at /tmp from the admin account's point of view:
______________________________________________________________________
$ cd /tmp
$ ls -al
total 4046
drwxrwxrwx+   3 Frank    Users           0 Apr 29 12:09 .
drwxrwx---+  10 Frank    Users           0 Apr 29 11:06 ..
drwxrwxrwx+   3 Frank    None            0 Apr 29 11:40 CygIPC
-rw-rw-rw-    1 SYSTEM   Administ  3916520 Apr 29 12:09 MultiFileMsg
-rw-rw-rw-    1 SYSTEM   Administ    22032 Apr 29 12:09 MultiFileSem
-rw-rw-rw-    1 SYSTEM   Administ   202768 Apr 29 12:09 MultiFileShm
______________________________________________________________________

* Since I did a chmod on /tmp, the CygIPC files (Multi*) show read/write
   permissions for all.  That's good.

* So, with /usr/bin permissions adjusted, let's try again.  And to be
   sure, let's also change group ownership:
______________________________________________________________________
$ mkdir /usr/share/postgresql/data
$ chown postgres:Users /usr/share/postgresql/data
$ ls -al /usr/share/postgresql/
total 317
drwxrwx---+   5 Frank    Users           0 Apr 29 12:26 .
drwxrwx---+  43 Frank    Users           0 Apr 29 11:02 ..
drwxrwx---+   2 Frank    Users           0 Apr 29 10:50 contrib
-rwxr-x---+   1 Frank    Users       38176 Feb 18 11:14
conversion_create.sql
drwxr-xr-x+   2 postgres Users           0 Apr 29 12:26 data
drwxrwx---+   2 Frank    Users           0 Apr 29 10:50 java
-rwxr-x---+   1 Frank    Users        2329 Feb 18 11:14 pg_hba.conf.sample
-rwxr-x---+   1 Frank    Users        1441 Feb 18 11:14 pg_ident.conf.sample
-rwxr-x---+   1 Frank    Users      225491 Feb 18 11:14 postgres.bki
-rwxr-x---+   1 Frank    Users       48627 Feb 18 11:14 postgres.description
-rwxr-x---+   1 Frank    Users        5043 Feb 18 11:14
postgresql.conf.sample
______________________________________________________________________

* Next let's stop cygipc, delete the tmp files, then restart, just to
   make sure:
______________________________________________________________________
$ net stop ipc-daemon
The Cygwin IPC Daemon service is stopping.
The Cygwin IPC Daemon service was stopped successfully.

$ rm /tmp/MultiFile*
$ net start ipc-daemon
The Cygwin IPC Daemon service is starting.
The Cygwin IPC Daemon service was started successfully.
______________________________________________________________________

* Finally, let's switch back to 'postgres' account, look at the cygipc
   tmp files (just to see what permissions we see from 'postgres' acct,
   and then let's try again:
______________________________________________________________________
postgres@SEESINK ~
$ ls -al /tmp
total 4046
drwxrwxrwx+   3 Frank    Users           0 Apr 29 12:28 .
drwxrwx---+  10 Frank    Users           0 Apr 29 11:06 ..
drwxrwxrwx+   3 Frank    None            0 Apr 29 11:40 CygIPC
-rw-rw-rw-    1 SYSTEM   Administ  3916520 Apr 29 12:28 MultiFileMsg
-rw-rw-rw-    1 SYSTEM   Administ    22032 Apr 29 12:28 MultiFileSem
-rw-rw-rw-    1 SYSTEM   Administ   202768 Apr 29 12:28 MultiFileShm

$ initdb -D /usr/share/postgresql/data
The files belonging to this database system will be owned by user
"postgres".
This user must also own the server process.

The database cluster will be initialized with locale C.

Fixing permissions on existing directory /usr/share/postgresql/data... ok
creating directory /usr/share/postgresql/data/base... ok
creating directory /usr/share/postgresql/data/global... ok
creating directory /usr/share/postgresql/data/pg_xlog... ok
creating directory /usr/share/postgresql/data/pg_clog... ok
creating template1 database in /usr/share/postgresql/data/base/1...
IpcSemaphore
Create: semget(key=1, num=17, 03600) failed: Function not implemented

initdb failed.
______________________________________________________________________

* BZZZZ!  Still not happening.  Just for a quick look, here's what we
   see in /usr/share/postgresql:
______________________________________________________________________
postgres@SEESINK /usr/share/postgresql/data
$ ls -al
total 1
drwx------+   6 postgres Users           0 Apr 29 12:30 .
drwxrwx---+   5 Frank    Users           0 Apr 29 12:26 ..
-rw-------    1 postgres None            4 Apr 29 12:30 PG_VERSION
drwx------+   3 postgres None            0 Apr 29 12:30 base
drwx------+   2 postgres None            0 Apr 29 12:30 global
drwx------+   2 postgres None            0 Apr 29 12:30 pg_clog
drwx------+   2 postgres None            0 Apr 29 12:30 pg_xlog
______________________________________________________________________

FINAL COMMENTS:

The issue definitely appears to be permissions-related, as I was easily
able to execute 'initdb' from the NT administrator account.  But what am
I missing?

Please note I have also tried changing the 'Cygwin IPC Daemon' service
permissions to make the service run in the same 'postgres' user context
if that were the case (doing the usual deleting of the /tmp/Multi* files
of course prior to launching), but to no avail.  Doing so showed the
/tmp/Multi* files as follows:
______________________________________________________________________
$ cd /tmp
$ ls -al
total 4046
drwxrwxrwx+   3 Frank    Users           0 Apr 29 13:36 .
drwxrwx---+  10 Frank    Users           0 Apr 29 11:06 ..
drwxrwxrwx+   3 Frank    None            0 Apr 29 11:40 CygIPC
-rw-rw-rw-    1 postgres None      3916520 Apr 29 13:36 MultiFileMsg
-rw-rw-rw-    1 postgres None        22032 Apr 29 13:36 MultiFileSem
-rw-rw-rw-    1 postgres None       202768 Apr 29 13:36 MultiFileShm
______________________________________________________________________

And no matter what, the following test was always the same when run from
the 'postgres' user account:
______________________________________________________________________
$ ipctest s
Test v0.03
Unable to create semaphore
semget : Function not implemented
______________________________________________________________________


If this isn't detailed enough, please let me know what other information
might be of use.

Thanks in advance for any and all help in this regard.  I've been
scratching my head on this one for awhile.  I have searched all over
looking for answers before posting here, but if I've overlooked
something trivial...well, apologies in advance.


pgsql-cygwin by date:

Previous
From: Jason Tishler
Date:
Subject: Re: Compiling cvs code with Cygwin problems
Next
From: Jason Tishler
Date:
Subject: Re: initdb failure with PostgreSQL 7.3.2 / Cygwin 1.3.22-1 /