Re: BUG #9531: Failed to install

From: "Yong Zhang" <yzhang(at)trinityusa(dot)com>
To: "Dave Page" <dpage(at)pgadmin(dot)org>
Cc: "Sandeep Thakkar" <sandeep(dot)thakkar(at)enterprisedb(dot)com>, "Pg Bugs" <pgsql-bugs(at)postgresql(dot)org>
Subject: Re: BUG #9531: Failed to install
Date: 2014-03-13 14:28:47
Message-ID: 29FE3458A4A2B6419D1558999668038F014ED526@usmail.trinitybiotech.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

You're correct. The installer script doesn't try to change ownership directly. But it does it in an indirect way via initdb.exe. Here is what I got when I ran initdb.exe in the command window:

"C:\Program Files (x86)\PostgreSQL\9.1\bin\initdb.exe" --pwfile="password.txt" --locale="English_United States" --encoding=UTF-8 -A trust -U postgres -D "C:\Program Files (x86)\PostgreSQL\9.1\data"
The files belonging to this database system will be owned by user "yzhang".
This user must also own the server process.

The database cluster will be initialized with locale English_United States.
The default text search configuration will be set to "english".

fixing permissions on existing directory C:/Program Files (x86)/PostgreSQL/9.1/data ... initdb: could not change permissions of directory "C:/Program Files (x86)/PostgreSQL/9.1/data": Permission denied

This is the exact error in the log file I got when I ran the installer. I don't understand why it tried to change the ownership of data folder to me. All it needs is the permissions!

And the fact is that the installer had messed up three different machines (Windows 7 Ultimate SP1 64-bit)!

Thanks,

Yong

-----Original Message-----
From: Dave Page [mailto:dpage(at)pgadmin(dot)org]
Sent: Wednesday, March 12, 2014 2:23 PM
To: Yong Zhang
Cc: Sandeep Thakkar; Pg Bugs
Subject: Re: [BUGS] BUG #9531: Failed to install

On Wed, Mar 12, 2014 at 2:52 PM, Yong Zhang <yzhang(at)trinityusa(dot)com> wrote:
> Hello,
>
>
>
> After I submitted the bug online yesterday I tried to install 9.1 with
> the data folder specified to a folder which is not in Program Files
> (x86). The result was a disaster – it changed the owner of my C:\ to
> postgres. So I had to go through lots trouble to restore my computer back to the working state.

I don't see any way that is possible. The installer only grants permissions - it doesn't touch the ownership; that requires use of commands/APIs that are not called anywhere in the installer as far as I can see.

--
Dave Page
Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake

EnterpriseDB UK: http://www.enterprisedb.com The Enterprise PostgreSQL Company

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Dave Page 2014-03-13 14:38:59 Re: BUG #9531: Failed to install
Previous Message Tom Lane 2014-03-13 14:19:00 Re: BUG #9555: pg_dump for tables with inheritance recreates the table with the wrong order of columns