Re: Problems running PostgreSQL on Windows XP - Mailing list pgsql-cygwin

From Roger Ackroyd
Subject Re: Problems running PostgreSQL on Windows XP
Date
Msg-id 000a01c34b26$da205ba0$b200a8c0@mydomain.com
Whole thread Raw
Responses Re: Problems running PostgreSQL on Windows XP  (Jason Tishler <jason@tishler.net>)
List pgsql-cygwin
Hi Seth and Jason and any other listeners
Phew.
Have now got postmaster to start. I had to do the following and am really not sure that it is 'right'. Following, may perhaps be a step on the way to nailing this one for good however?
Starting at [7] (or the last ditch attempt!!)
Switched to the postgres account.
chmod 777 /usr/share/postgresql/data
chmod a+rx /usr/share/postgresql/data
initdb /usr/share/postgresql/data
// Database created itself and terminated with ok. Would not run at all without chmod's.
Switched back to Owner account
chmod 777 /usr/share/postgresql/data
chmod a+rx /usr/share/postgresql/data
net start postmaster
//Postmaster starts ok. Again, needed chmod's.
 
This is probably very, very wrong, bad, whatever from a security point of view, but of course, I do not know just what the correct rights should be!. I would have thought that now, it should be possible, to gradually reduce the directory rights until it fails? I reckon that doing so might reveal a 'cast iron' solution to the problems folks seem to have on this platform. I would like somebodys comments on this before I try and would prefer them correct once and for all.
Any way, tis running 'for now'.
//-------------------
I only noticed this since your e-mail and tried making the changes that follow. It dont think it made the 'real' difference to the postmaster starting problem, because I realise that I had already set the user and password manually from the services window anyway.
I noticed:-
cygrunsrv --help
....
....
 -w, --passwd <password>   Optional password for user. Only needed
                           if a user is given. If a user has an empty
                           password, enter `-w '. If a user is given but
                           no password, cygrunsrv will ask for a password
                           interactively.
 
In the readme, there is no argument shown in the line, for either -w or --passwd. (I had a password set on the postgres account, so cygrunsrv essentially ignored the credentials altogether, just did not fail or warn). I think that it 'loads' the services window logon values from these? If either user or password is missing then it leaves them as Local system Account, so, ideally the line needs to be amended to show:-
 
cygrunsrv --install postmaster ... ... --user postgresql --passwd $password ... ....
 
That also remains consistent with step 2 and footnote [11]. Alternatively, the advice that these must be set explicitly and neither argument be shown in the line.
//--------------------------------------
 
Thanks for your help. I now of course, would like to know what correct running permissions should be. Maybe Seth could check what his permissions are set at and let me know.
Regards
Roger

pgsql-cygwin by date:

Previous
From: Seth Rubin
Date:
Subject: Re: Windows XP (Home) Install tutorial
Next
From: "Roger Ackroyd"
Date:
Subject: Sorry for 'changing the subject' on last post