Re: BUG #15049: Initdb.exe failing to create DB
От | Magnus Hagander |
---|---|
Тема | Re: BUG #15049: Initdb.exe failing to create DB |
Дата | |
Msg-id | CABUevEymhMbNHapKvZ_R54f5RFhnQ--rLNsUEvy-s53MB0nGRA@mail.gmail.com обсуждение исходный текст |
Ответ на | Re: BUG #15049: Initdb.exe failing to create DB (Dheeraj <dheeru.chhabra@gmail.com>) |
Список | pgsql-bugs |
On Tue, Feb 6, 2018 at 5:55 AM, Dheeraj <dheeru.chhabra@gmail.com> wrote:
Dear Pavan, Pavel,This is little confusing. See below scenarios -Scenario -1: When I run the postgresDB installation with Windows Administrator user who has all the rights means he is privileged user. The installation is successful. In that case it is not complaining but creating the DB successfully. Why it is working in this case if it only needs unprivileged user.C:\Users\ADMINI~1\AppData\Local\Temp\extract6096>"D:\BMC Software\TrueSightPServer\ truesightpserver\modules\ pgsql\bin\initdb.exe" -U dheeraj -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\ DBdata6820706518760534179ks" The files belonging to this database system will be owned by user "Administrator".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".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 ... okselecting default max_connections ... 100selecting default shared_buffers ... 128MBselecting dynamic shared memory implementation ... windowscreating configuration files ... okrunning bootstrap script ... okperforming post-bootstrap initialization ... oksyncing data to disk ... okSuccess. You can now start the database server using:"D:\BMC Software\TrueSightPServer\truesightpserver\modules\ pgsql\bin\pg_ctl" -D "D:\BMC Software\TrueSightPServer\ truesightpserver\data\pgsql" -l logfile start Scenario-2: In few occasions, a normal user who is part of same Administrator group, is failed to create the DB.C:\Users\138580\AppData\Local\Temp\extract5416>D:\BMC\ TrueSightPServer\ truesightpserver\modules\ pgsql\bin\initdb.exe -U SVC_BMCMON -A trust -E utf8 -D D:\BMC\TrueSightPServer\ truesightpserver\data\pgsql -X D:\BMC\TrueSightPServer\ truesightpserver\data\pgsql_ txnlog --pwfile D:\BMC\TrueSightPServer\ truesightpserver\tmp\ DBdata4550223386000473763ks initdb: could not start process for command "D:\BMC\TrueSightPServer\truesightpserver\modules\ pgsql\bin\initdb.exe -U SVC_BMCMON -A trust -E utf8 -D D:\BMC\TrueSightPServer\ truesightpserver\data\pgsql -X D:\BMC\TrueSightPServer\ truesightpserver\data\pgsql_ txnlog --pwfile D:\BMC\TrueSightPServer\ truesightpserver\tmp\ DBdata4550223386000473763ks": error code 1260
^ this here is probably the root of your problem. Windows errorcode 1260 means "Windows cannot open this program because it has been prevented by a software restriction policy".
So it looks like somewhere on your system there is a policy preventing initdb from executing itself (which it will do on Windows).
initdb: could not re-execute with restricted token: error code 3
The files belonging to this database system will be owned by user "138580".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/TrueSightPServer/truesightpserver/data/pgsql ... ok creating directory D:/BMC/TrueSightPServer/truesightpserver/data/pgsql_ txnlog ... ok creating subdirectories ... okselecting default max_connections ... 10selecting default shared_buffers ... 400kBselecting dynamic shared memory implementation ... windowscreating configuration files ... okExecution of PostgreSQL by a user with administrative permissions is notpermitted.
This indicates that the user is at least "partially administrative". It may not be Administrator, but it has administrative permissions. This means it's member of administrators, domain admins, or power users groups, directly or indirectly.
As you see in scenario-1, DB creation is successfull with Administrator user but in scenario-2, the install fails with a user who is part of same Administrator group.Please clarify
When running as administrator it successfully manages to re-execute itself without the administrator permissions. With the second user, that is blocked by some policy.
//Magnus
В списке pgsql-bugs по дате отправления: