Re: initdb problem on Windows XP Home

From: adurrant(at)cogeco(dot)ca
To: Richard Huxton <dev(at)archonet(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: initdb problem on Windows XP Home
Date: 2006-12-02 02:49:35
Message-ID: 4570e9bf.1c7.38e7.16645@cogeco.ca
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hi Richard,

Some more information tonight. I logged in under safe mode and checked the security settings for "C:\Program
Files\PostgreSQL" and the user postgres had full control. However, I could not issue a cd "C:\Program
Files\PostgreSQL". I looked at the security for Program Files, and postgres was not part included. I added the user
postgres with Read only permissions. Still couldn't change to the PostgreSQL folder. Changed security permissions to
Read and Execute to include list directory contents. Still couldn't change folders. I think now that initdb is trying
to create the folders because as thev postgres user it can't see the folder so assumes it not to be there. Then tries
to create it, which of course it already exists, so it fails with file exists. The million dollar question is why can't
the postgres user access the folder when logged in and security settings show it should have access.

Do I need to give permissions to postgres for the C: drive? Somehow that doesn't seem correct.

Any ideas?

Thanks for your help.
Alex.

>
> adurrant(at)cogeco(dot)ca wrote:
> > Hi Richard,
> >
> > Thanks for getting back to me.
> >
> > Yes, I have a "postgres" limited account that will own the files. (This was the one created by the installer.) In
> > order to ensure the this user has access/full control to "C:\Program Files\Postgresql\8.1", I used the "cacls"
> > command to edit the access control list and add postgres:f.
> > i.e. I ran
> > cacls "C:\Program Files\PostgreSQL\8.1" /t /e /g postgres:f
> >
> > (I've discovered this morning that I can boot in safe mode to get the Security tab on folder properties in XP Home.
> > I'll check that this evening to see if it looks correct.)
> >
> > However, to continue with your suggestion, after running the cacls statment above, I did log in as postgres and then
> > ran:
> > initd -D "C:\Program Files\Postgresql\8.1\data" ...
> > Yes, I did include the double quotes (due to the space in "Program Files") but it was still the same result. "could
> > not create directory "C:/Program Files": File exists".
>
> Hmm. That doesn't make any sense to me. I'm guessing it's a different
> error code behind the scenes. I suppose you can issue
> cd "C:/Program Files"
> dir
> successfully as user postgres?
>
> If so, try forward slashes to match the output of the error message:
> "C:/Program Files/Postgresql/..."
>
> If that's still not working and none of the Windows guys pop up, I'll
> try and reproduce it on my XP-Pro laptop.
> --
> Richard Huxton
> Archonet Ltd

Browse pgsql-general by date

  From Date Subject
Next Message Brian Wipf 2006-12-02 03:26:53 Re: Unsuccessful SIGINT - More Info
Previous Message adurrant 2006-12-02 02:35:24 Re: initdb problem on Windows XP Home