Re: installer woes, 9.1 on windows 2008 R2 - Mailing list pgsql-general

From Igor Neyman
Subject Re: installer woes, 9.1 on windows 2008 R2
Date
Msg-id A76B25F2823E954C9E45E32FA49D70EC1BBD8CD2@mail.corp.perceptron.com
Whole thread Raw
In response to Re: installer woes, 9.1 on windows 2008 R2  (John R Pierce <pierce@hogranch.com>)
Responses Re: installer woes, 9.1 on windows 2008 R2  (John R Pierce <pierce@hogranch.com>)
List pgsql-general

> -----Original Message-----
> From: pgsql-general-owner@postgresql.org [mailto:pgsql-general-
> owner@postgresql.org] On Behalf Of John R Pierce
> Sent: Wednesday, June 26, 2013 4:13 PM
> To: pgsql-general@postgresql.org
> Subject: Re: [GENERAL] installer woes, 9.1 on windows 2008 R2
>
> On 6/26/2013 12:49 PM, Igor Neyman wrote:
> > Look for bitrock_installer.log in the
> \Users\<account_you_are_using>\AppData\Local\Temp.
> > Or just do search for bitrock_installer.log file.
>
> ahhh.     two weirdnesses below...
>
> A) why is it using 'myusername' (the account I ran the installer from) instead
> of the postgres service account?

This is correct.  User 'myusername' running Install should have permissions to the whole D:\PostgreSQL (with
subdirectories).
User Postgres needs permissions only to D:\PostgreSQL\9.1\data.
So, according to this:

> fixing permissions on existing directory D:/PostgreSQL/9.1/data ...
> initdb: could not change permissions of directory
> "D:/PostgreSQL/9.1/data": Permission denied

'myusername' couldn't grant permissions on this folder to "postgres" user.

> B) why can't it change the permissions?

Try to look at Windows Event Log, m.b. there will be some useful info.
M.b. you need to run installer local (not corporate active directory) account, still member of local Administrators
group.

Also, from your original posting:
" I added the LOCAL\postgres user to the permissions on the D:\postgresql\9.1 directory and gave it full control"

You don't have to create Postgres account "manually" and grant him privileges - installer does it for you.  Could this
beyour problem? 

Regards,
Igor Neyman


>
> ..........
> [11:35:51] Running the post-installation/upgrade actions:
> [11:35:51] Delete the temporary scripts directory...
> [11:35:51] Write the base directory to the ini file...
> [11:35:51] Write the version number to the ini file...
> Initialising the database cluster (this may take a few minutes)...
> Executing cscript //NoLogo
> "C:\PostgreSQL\9.1/installer/server/initcluster.vbs" "postgres"
> "postgres" "****" "C:\PostgreSQL\9.1" "D:\PostgreSQL\9.1\data" 5432
> "DEFAULT"
> Script exit code: 1
>
> Script output:
>   WScript.Shell Initialized...
> Scripting.FileSystemObject initialized...
>
> Called CreateDirectory(D:\PostgreSQL\9.1\data)...
> Called CreateDirectory(D:\PostgreSQL\9.1)...
> Called CreateDirectory(D:\PostgreSQL)...
> Called CreateDirectory(D:\)...
> WScript.Network initialized...
> Called IsVistaOrNewer()...
>      'winmgmts' object initialized...
>      Version:6.1
>      MajorVersion:6
> Ensuring we can read the path D: (using icacls) to myusername:
>      Executing batch file 'rad72A5A.bat'...
>      processed file: D:\
> Successfully processed 1 files; Failed processing 0 files
>
> Called IsVistaOrNewer()...
>      'winmgmts' object initialized...
>      Version:6.1
>      MajorVersion:6
> Ensuring we can read the path D:\PostgreSQL (using icacls) to myusername:
>      Executing batch file 'rad72A5A.bat'...
>      processed file: D:\PostgreSQL
> Successfully processed 1 files; Failed processing 0 files
>
> Called IsVistaOrNewer()...
>      'winmgmts' object initialized...
>      Version:6.1
>      MajorVersion:6
> Ensuring we can read the path D:\PostgreSQL\9.1 (using icacls) to
> myusername:
>      Executing batch file 'rad72A5A.bat'...
>      processed file: D:\PostgreSQL\9.1
> Successfully processed 1 files; Failed processing 0 files
>
> Called IsVistaOrNewer()...
>      'winmgmts' object initialized...
>      Version:6.1
>      MajorVersion:6
> Ensuring we can read the path D:\PostgreSQL\9.1\data (using icacls) to
> myusername:
>      Executing batch file 'rad72A5A.bat'...
>      processed file: D:\PostgreSQL\9.1\data Successfully processed 1 files;
> Failed processing 0 files
>
> Called IsVistaOrNewer()...
>      'winmgmts' object initialized...
>      Version:6.1
>      MajorVersion:6
> Ensuring we can write to the data directory (using icacls) to myusername:
>      Executing batch file 'rad72A5A.bat'...
>      processed file: D:\PostgreSQL\9.1\data Successfully processed 1 files;
> Failed processing 0 files
>
>      Executing batch file 'rad72A5A.bat'...
>      The files belonging to this database system will be owned by user
> "myusername".
> This user must also own the server process.
>
> The database cluster will be initialized with locale English_United States.1252.
> The default text search configuration will be set to "english".
>
> fixing permissions on existing directory D:/PostgreSQL/9.1/data ...
> initdb: could not change permissions of directory
> "D:/PostgreSQL/9.1/data": Permission denied
>
> Called Die(Failed to initialise the database cluster with initdb)...
> Failed to initialise the database cluster with initdb
>
> Script stderr:
>   Program ended with an error exit code
>
> --
> john r pierce                                      37N 122W
> somewhere on the middle of the left coast
>


pgsql-general by date:

Previous
From: Suzuki Hironobu
Date:
Subject: Re: Migration from DB2 to PostgreSQL-TIMESTAMP(arg1,arg1)
Next
From: Andreas Kretschmer
Date:
Subject: Re: convert from json to text[]