Re: initdb problem on Windows XP Home

From: adurrant(at)cogeco(dot)ca
To: pgsql-general(at)postgresql(dot)org
Cc: Richard Huxton <dev(at)archonet(dot)com>
Subject: Re: initdb problem on Windows XP Home
Date: 2006-12-01 14:33:27
Message-ID: 45703d37.1a0.197e.20788@cogeco.ca
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

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".

This looks to me like a problem in the folder processing. At first I thought that it wasn't handling the space in
"Program Files" correctly, so I tried a folder that had no spaces, but this had no effect. The message suggests to me
that it is always trying to create the folder regardless of whether it exists or not.

Thank you very much for your reply. If I have overlooked something, or if I'm completely out to lunch with what I've
done/tried, please let me know. Also, any further suggestions would be welcomed.

Thanks again.

Alex.

>
> OK. Stop. You've tried a bunch of different things without finding out
> where the initial problem is.
>
> You're running initdb manually, so you'll need to check the permissions
> are in place manually too.
>
> I'm assuming you have a user "postgres" that will own the files and run
> the processes. Make sure that user "postgres" has full permissions on
> "C:\Program Files\Postgresql\8.1"
>
> Log in as user "postgres" (or use runas to open a shell as that user)
> and then run:
> initd -D "C:\Program Files\Postgresql\8.1\data" ...
> Note the double quotes
>
> Let us know what happens then.
>
> PS - it might be simpler to run the uninstaller, make sure you've
> deleted the PostgreSQL directories and user and just run it again.
>
> --
> Richard Huxton
> Archonet Ltd
>
> ---------------------------(end of broadcast)---------------------------
> TIP 6: explain analyze is your friend

>
> adurrant(at)cogeco(dot)ca wrote:
> > Hi Again,
> >
> > I posted earlier about a problem installing 8.1.5 on Windows XP Home.
> > THat message was delayed, so it likely will not show up.
> >
> > THe problem is occuring on execution of initdb. I skipped the cluster
> > creation in the installation so that I could run it manually, but it
> > made no difference.
> >
> > The contents of the temp file for the initdb is:
> >
> > 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 C:/Program
> > Files/PostgreSQL/8.1/data ... ok creating subdirectories ... initdb:
> > could not create directory "C:/Program Files": File exists initdb:
> > removing contents of data directory "C:/Program
> > Files/PostgreSQL/8.1/data"
> >
> > I tried specifying a folder that doesn't exist, and then I get a
> > permissions error. Fine, I logged into the system under the
> > restricted account and tried running initdb again.

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Csaba Nagy 2006-12-01 14:37:54 FK locking still too strong
Previous Message John McCawley 2006-12-01 14:19:01 Re: Separation of clients' data within a database