Re: BUG #15049: Initdb.exe failing to create DB

From: Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>
To: dheeru(dot)chhabra(at)gmail(dot)com, pgsql-bugs(at)lists(dot)postgresql(dot)org
Subject: Re: BUG #15049: Initdb.exe failing to create DB
Date: 2018-02-05 08:07:51
Message-ID: CAFj8pRDOWhdJ-Li31Pn1pyv1UkQUm5mNFDotKUL9a53ojG8O3g@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

Hi

doesn't look like PostgreSQL bug

2018-02-05 8:53 GMT+01:00 PG Bug reporting form <noreply(at)postgresql(dot)org>:

> The following bug has been logged on the website:
>
> Bug reference: 15049
> Logged by: dheeraj chhabra
> Email address: dheeru(dot)chhabra(at)gmail(dot)com
> PostgreSQL version: 9.4.4
> Operating system: Windows 2012 R2
> Description:
>
> The DB creation is failing with below output:
>
> initdb: could not start process for command ""D:\BMC
> Software\TrueSightPServer\truesightpserver\modules\pgsql\bin\initdb.exe"
> -U
> SVC_BMCMON -A trust -E utf8 -D "D:\BMC
> Software\TrueSightPServer\truesightpserver\data\pgsql" -X "D:\BMC
> Software\TrueSightPServer\truesightpserver\data\pgsql_txnlog" --pwfile
> "D:\BMC
> Software\TrueSightPServer\truesightpserver\tmp\
> DBdata7317520133955961463ks"":
> error code 1260
> initdb: could not re-execute with restricted token: error code 3
> The files belonging to this database system will be owned by user
> "admrak".
> This user must also own the server process.
>
> The database cluster will be initialized with locale
> "English_Australia.1252".
> The default text search configuration will be set to "english".
>
> Data page checksums are disabled.
>
> creating directory D:/BMC
> Software/TrueSightPServer/truesightpserver/data/pgsql ... ok
> creating directory D:/BMC
> Software/TrueSightPServer/truesightpserver/data/pgsql_txnlog ... ok
> creating subdirectories ... ok
> selecting default max_connections ... 10
> selecting default shared_buffers ... 400kB
> selecting dynamic shared memory implementation ... windows
> creating configuration files ... ok
> running bootstrap script ... Execution of PostgreSQL by a user with
> administrative permissions is not
> permitted.
> The server must be started under an unprivileged user ID to prevent
> possible system security compromises. See the documentation for
> more information on how to properly start the server.
> child process exited with exit code 1
>

You are running initdb as privileged user. It is prohibited due security.

https://dba.stackexchange.com/questions/35056/trying-to-start-a-newly-created-cluster-in-postgresql-on-windows
https://www.postgresql.org/message-id/7be3f35d040930110679c11892@mail.gmail.com

Regards

Pavel

> initdb: removing data directory "D:/BMC
> Software/TrueSightPServer/truesightpserver/data/pgsql"
> initdb: removing transaction log directory "D:/BMC
> Software/TrueSightPServer/truesightpserver/data/pgsql_txnlog"
>
>
> Please suggest the resolution ASAP.
>
> -Dheeraj
>
>

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Dheeraj 2018-02-05 09:18:30 Re: BUG #15049: Initdb.exe failing to create DB
Previous Message PG Bug reporting form 2018-02-05 08:07:13 BUG #15050: Initdb.exe failing to create DB