Re: BUG #9531: Failed to install - Mailing list pgsql-bugs

From Dave Page
Subject Re: BUG #9531: Failed to install
Date
Msg-id CA+OCxoyo_yh7TxZnVgay1GGEzuAmbaNUM9oEHO0+PuPaL=VtYQ@mail.gmail.com
Whole thread Raw
In response to BUG #9531: Failed to install  (yzhang@trinityusa.com)
List pgsql-bugs
On Thu, Mar 13, 2014 at 2:28 PM, Yong Zhang <yzhang@trinityusa.com> wrote:
> 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
permissionsof 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
ownershipof data folder to me. All it needs is the permissions! 
>

If you check the initdb source code, you'll see it just calls chmod,
not chown or any of it's related functions as far as I can see. That's
also implied by the message you quote above: could not change
*permissions* of directory.

I don't see anything in initdb OR the installer that can change
directory ownership on Windows.

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

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

pgsql-bugs by date:

Previous
From: Tom Lane
Date:
Subject: Re: BUG #9555: pg_dump for tables with inheritance recreates the table with the wrong order of columns
Next
From: Marko Tiikkaja
Date:
Subject: Re: BUG #9557: Row not visible after receiving notification