Thread: Access is denied during initdb

Access is denied during initdb

From
"O.B."
Date:
I'm attempting to install PostgreSQL v8.0.3 on a Windows XP SP2 machine.
  The error log below is generated and the installation rolls back.  I
have verified that the "postgres" user (service account) has
read/write/execute permissions to the entire C: drive as well as having
the "logon as service" right enabled.  What's missing?


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:/PostgreSQL/8.0/data ... ok
creating directory C:/PostgreSQL/8.0/data/global ... ok
creating directory C:/PostgreSQL/8.0/data/pg_xlog ... ok
creating directory C:/PostgreSQL/8.0/data/pg_xlog/archive_status ... ok
creating directory C:/PostgreSQL/8.0/data/pg_clog ... ok
creating directory C:/PostgreSQL/8.0/data/pg_subtrans ... ok
creating directory C:/PostgreSQL/8.0/data/base ... ok
creating directory C:/PostgreSQL/8.0/data/base/1 ... ok
creating directory C:/PostgreSQL/8.0/data/pg_tblspc ... ok
selecting default max_connections ... Access is denied.
Access is denied.
Access is denied.
Access is denied.
Access is denied.
Access is denied.
10
selecting default shared_buffers ... Access is denied.
Access is denied.
Access is denied.
Access is denied.
Access is denied.
Access is denied.
Access is denied.
Access is denied.
Access is denied.
Access is denied.
Access is denied.
50
creating configuration files ... ok
creating template1 database in C:/PostgreSQL/8.0/data/base/1 ... ok
initializing pg_shadow ... Access is denied.
child process was terminated by signal 1
initdb: removing contents of data directory "C:/PostgreSQL/8.0/data"



Re: Access is denied during initdb

From
"O.B."
Date:
O.B. wrote:
> I'm attempting to install PostgreSQL v8.0.3 on a Windows XP SP2 machine.
>   The error log below is generated and the installation rolls back.  I
> have verified that the "postgres" user (service account) has
> read/write/execute permissions to the entire C: drive as well as having
> the "logon as service" right enabled.  What's missing?


So I take it that no response means that the PostgreSQL installer does not
work with Windows XP SP2?

Here's additional information from the log file surrounding the problem with
initdb failing:

Action 18:10:09: SetPermissions. Setting filesystem permissions...
MSI (s) (2C:AC) [18:10:09:323]: Executing op:

CustomActionSchedule(Action=SetPermissions,ActionType=1025,Source=BinaryData,Target=SetPermissions@4,CustomActionData=1033;C:\PostgreSQL\8.0\;C:\PostgreSQL\8.0\data\;DA15666;postgres;mypassword)
MSI (s) (2C:30) [18:10:09:339]: Invoking remote custom action. DLL:
C:\WINDOWS\Installer\MSI50.tmp, Entrypoint: SetPermissions@4
MSI (s) (2C:AC) [18:10:12:619]: Executing op:
ActionStart(Name=RunInitdb,Description=Initializing database cluster (this
may take a minute or two)...,)
Action 18:10:12: RunInitdb. Initializing database cluster (this may take a
minute or two)...
MSI (s) (2C:AC) [18:10:12:619]: Executing op:

CustomActionSchedule(Action=RunInitdb,ActionType=1025,Source=BinaryData,Target=RunInitdb@4,CustomActionData=1033;C:\PostgreSQL\8.0\;C:\PostgreSQL\8.0\data\;5432;;C;SQL_ASCII;postgres;testdb;DA15666;postgres;mypassword)
MSI (c) (40:58) [18:10:15:556]: Note: 1: 2205 2:  3: Error
MSI (c) (40:58) [18:10:15:556]: Note: 1: 2228 2:  3: Error 4: SELECT
`Message` FROM `Error` WHERE `Error` = 2888
DEBUG: Error 2888:  Executing the TextStyle view failed
The installer has encountered an unexpected error installing this package.
This may indicate a problem with this package. The error code is 2888. The
arguments are: TextStyle, ,
MSI (c) (40:58) [18:10:17:400]: Note: 1: 2205 2:  3: Error
MSI (c) (40:58) [18:10:17:400]: Note: 1: 2228 2:  3: Error 4: SELECT
`Message` FROM `Error` WHERE `Error` = 2888
DEBUG: Error 2888:  Executing the TextStyle view failed
The installer has encountered an unexpected error installing this package.
This may indicate a problem with this package. The error code is 2888. The
arguments are: TextStyle, ,
MSI (s) (2C:F4) [18:10:12:651]: Invoking remote custom action. DLL:
C:\WINDOWS\Installer\MSI51.tmp, Entrypoint: RunInitdb@4
MSI (c) (40:58) [18:10:22:555]: Note: 1: 2205 2:  3: Error
MSI (c) (40:58) [18:10:22:555]: Note: 1: 2228 2:  3: Error 4: SELECT
`Message` FROM `Error` WHERE `Error` = 2867
DEBUG: Error 2867:  The error dialog property is not set
The installer has encountered an unexpected error installing this package.
This may indicate a problem with this package. The error code is 2867. The
arguments are: , ,
MSI (c) (40:58) [18:10:22:555]: Font created.  Charset: Req=0, Ret=0, Font:
Req=MS Shell Dlg, Ret=MS Shell Dlg

MSI (c) (40:58) [18:11:07:390]: Note: 1: 2205 2:  3: Error
MSI (c) (40:58) [18:11:07:390]: Note: 1: 2228 2:  3: Error 4: SELECT
`Message` FROM `Error` WHERE `Error` = 2888
DEBUG: Error 2888:  Executing the TextStyle view failed
The installer has encountered an unexpected error installing this package.
This may indicate a problem with this package. The error code is 2888. The
arguments are: TextStyle, ,
Failed to run initdb: 1!
Please see the logfile in 'C:\PostgreSQL\8.0\tmp\initdb.log'.
Note! You must read/copy this logfile before you click OK, or it will be
automatically removed.
MSI (s) (2C!F0) [18:11:08:577]: Note: 1: 2205 2:  3: Error
MSI (s) (2C!F0) [18:11:08:577]: Note: 1: 2228 2:  3: Error 4: SELECT
`Message` FROM `Error` WHERE `Error` = 1709
MSI (s) (2C!F0) [18:11:08:577]: Product: PostgreSQL 8.0 -- Failed to run
initdb: 1!
Please see the logfile in 'C:\PostgreSQL\8.0\tmp\initdb.log'.
Note! You must read/copy this logfile before you click OK, or it will be
automatically removed.

Action ended 18:11:08: InstallFinalize. Return value 3.
MSI (s) (2C:AC) [18:11:08:593]: User policy value 'DisableRollback' is 0
MSI (s) (2C:AC) [18:11:08:593]: Machine policy value 'DisableRollback' is 0
MSI (s) (2C:AC) [18:11:08:608]: Executing op:

Header(Signature=1397708873,Version=301,Timestamp=852594993,LangId=1033,Platform=0,ScriptType=2,ScriptMajorVersion=21,ScriptMinorVersion=4,ScriptAttributes=1)

Re: Access is denied during initdb

From
Richard Huxton
Date:
O.B. wrote:
> O.B. wrote:
>
>> I'm attempting to install PostgreSQL v8.0.3 on a Windows XP SP2
>> machine.   The error log below is generated and the installation rolls
>> back.  I have verified that the "postgres" user (service account) has
>> read/write/execute permissions to the entire C: drive as well as
>> having the "logon as service" right enabled.  What's missing?
>
>
>
> So I take it that no response means that the PostgreSQL installer does
> not work with Windows XP SP2?

AFAIK it works fine, but I don't use it myself. Your original message
didn't seem to say anything that would let you judge the cause of the
problem. The only oddity was the apparent low value for shared_buffers.
That might be perfectly normal for Windows though.

> Here's additional information from the log file surrounding the problem
> with initdb failing:
>
> Action 18:10:09: SetPermissions. Setting filesystem permissions...
> MSI (s) (2C:AC) [18:10:09:323]: Executing op:
>
CustomActionSchedule(Action=SetPermissions,ActionType=1025,Source=BinaryData,Target=SetPermissions@4,CustomActionData=1033;C:\PostgreSQL\8.0\;C:\PostgreSQL\8.0\data\;DA15666;postgres;mypassword)

>
> MSI (s) (2C:30) [18:10:09:339]: Invoking remote custom action. DLL:
> C:\WINDOWS\Installer\MSI50.tmp, Entrypoint: SetPermissions@4
> MSI (s) (2C:AC) [18:10:12:619]: Executing op:
> ActionStart(Name=RunInitdb,Description=Initializing database cluster
> (this may take a minute or two)...,)
> Action 18:10:12: RunInitdb. Initializing database cluster (this may take
> a minute or two)...
> MSI (s) (2C:AC) [18:10:12:619]: Executing op:
>
CustomActionSchedule(Action=RunInitdb,ActionType=1025,Source=BinaryData,Target=RunInitdb@4,CustomActionData=1033;C:\PostgreSQL\8.0\;C:\PostgreSQL\8.0\data\;5432;;C;SQL_ASCII;postgres;testdb;DA15666;postgres;mypassword)

>
> MSI (c) (40:58) [18:10:15:556]: Note: 1: 2205 2:  3: Error
> MSI (c) (40:58) [18:10:15:556]: Note: 1: 2228 2:  3: Error 4: SELECT
> `Message` FROM `Error` WHERE `Error` = 2888
> DEBUG: Error 2888:  Executing the TextStyle view failed
> The installer has encountered an unexpected error installing this
> package. This may indicate a problem with this package. The error code
> is 2888. The arguments are: TextStyle, ,

Presumably this is the problem.

If no-one seems to know here, perhaps try the windows installer project.
They will be able to tell you what can cause this error.
   http://pgfoundry.org/projects/pginstaller/

--
   Richard Huxton
   Archonet Ltd

Re: Access is denied during initdb

From
"O.B."
Date:
Richard Huxton wrote:
> O.B. wrote:
>
>> Here's additional information from the log file surrounding the
>> problem with initdb failing:
>>
>> Action 18:10:09: SetPermissions. Setting filesystem permissions...
>> MSI (s) (2C:AC) [18:10:09:323]: Executing op:
>>
CustomActionSchedule(Action=SetPermissions,ActionType=1025,Source=BinaryData,Target=SetPermissions@4,CustomActionData=1033;C:\PostgreSQL\8.0\;C:\PostgreSQL\8.0\data\;DA15666;postgres;mypassword)

>>
>> MSI (s) (2C:30) [18:10:09:339]: Invoking remote custom action. DLL:
>> C:\WINDOWS\Installer\MSI50.tmp, Entrypoint: SetPermissions@4
>> MSI (s) (2C:AC) [18:10:12:619]: Executing op:
>> ActionStart(Name=RunInitdb,Description=Initializing database cluster
>> (this may take a minute or two)...,)
>> Action 18:10:12: RunInitdb. Initializing database cluster (this may
>> take a minute or two)...
>> MSI (s) (2C:AC) [18:10:12:619]: Executing op:
>>
CustomActionSchedule(Action=RunInitdb,ActionType=1025,Source=BinaryData,Target=RunInitdb@4,CustomActionData=1033;C:\PostgreSQL\8.0\;C:\PostgreSQL\8.0\data\;5432;;C;SQL_ASCII;postgres;testdb;DA15666;postgres;mypassword)

>>
>> MSI (c) (40:58) [18:10:15:556]: Note: 1: 2205 2:  3: Error
>> MSI (c) (40:58) [18:10:15:556]: Note: 1: 2228 2:  3: Error 4: SELECT
>> `Message` FROM `Error` WHERE `Error` = 2888
>> DEBUG: Error 2888:  Executing the TextStyle view failed
>> The installer has encountered an unexpected error installing this
>> package. This may indicate a problem with this package. The error code
>> is 2888. The arguments are: TextStyle, ,
>
>
> Presumably this is the problem.
>
> If no-one seems to know here, perhaps try the windows installer project.
> They will be able to tell you what can cause this error.
>   http://pgfoundry.org/projects/pginstaller/

I just installed PostgreSQL 8.0 with the "service" registration option
disabled and tried to execute the following and it fails with the same
error.

runas.exe /env /user:DA15666\postgres "C:\PostgreSQL\8.0\bin\initdb.exe
-D C:\PostgreSQL\8.0\data"

So the problem is not with the installer but either with initdb or how
my system is configured.  Help?


Re: Access is denied during initdb

From
Richard Huxton
Date:
O.B. wrote:
> Richard Huxton wrote:
>
>> O.B. wrote:
>>
>>> Here's additional information from the log file surrounding the
>>> problem with initdb failing:
>>>
>>> Action 18:10:09: SetPermissions. Setting filesystem permissions...
>>> MSI (s) (2C:AC) [18:10:09:323]: Executing op:
>>>
CustomActionSchedule(Action=SetPermissions,ActionType=1025,Source=BinaryData,Target=SetPermissions@4,CustomActionData=1033;C:\PostgreSQL\8.0\;C:\PostgreSQL\8.0\data\;DA15666;postgres;mypassword)

>>>
>>> MSI (s) (2C:30) [18:10:09:339]: Invoking remote custom action. DLL:
>>> C:\WINDOWS\Installer\MSI50.tmp, Entrypoint: SetPermissions@4
>>> MSI (s) (2C:AC) [18:10:12:619]: Executing op:
>>> ActionStart(Name=RunInitdb,Description=Initializing database cluster
>>> (this may take a minute or two)...,)
>>> Action 18:10:12: RunInitdb. Initializing database cluster (this may
>>> take a minute or two)...
>>> MSI (s) (2C:AC) [18:10:12:619]: Executing op:
>>>
CustomActionSchedule(Action=RunInitdb,ActionType=1025,Source=BinaryData,Target=RunInitdb@4,CustomActionData=1033;C:\PostgreSQL\8.0\;C:\PostgreSQL\8.0\data\;5432;;C;SQL_ASCII;postgres;testdb;DA15666;postgres;mypassword)

>>>
>>> MSI (c) (40:58) [18:10:15:556]: Note: 1: 2205 2:  3: Error
>>> MSI (c) (40:58) [18:10:15:556]: Note: 1: 2228 2:  3: Error 4: SELECT
>>> `Message` FROM `Error` WHERE `Error` = 2888
>>> DEBUG: Error 2888:  Executing the TextStyle view failed
>>> The installer has encountered an unexpected error installing this
>>> package. This may indicate a problem with this package. The error
>>> code is 2888. The arguments are: TextStyle, ,
>>
>>
>>
>> Presumably this is the problem.
>>
>> If no-one seems to know here, perhaps try the windows installer
>> project. They will be able to tell you what can cause this error.
>>   http://pgfoundry.org/projects/pginstaller/
>
>
> I just installed PostgreSQL 8.0 with the "service" registration option
> disabled and tried to execute the following and it fails with the same
> error.
>
> runas.exe /env /user:DA15666\postgres "C:\PostgreSQL\8.0\bin\initdb.exe
> -D C:\PostgreSQL\8.0\data"
>
> So the problem is not with the installer but either with initdb or how
> my system is configured.  Help?

The error you are giving is *not* an initdb error, or from any other
part of PostgreSQL proper (I can find no error with 2888 or TextStyle
anywhere in the source). It also explicitly mentions MSI, which is
Microsoft's installer, as well as initdb.

 From the list archives, most problems seem to be either:
  1. Some anti-virus package blocking the install
  2. Too few or too many permissions (PG won't run as a superuser).

--
   Richard Huxton
   Archonet Ltd