Re: Window2012R2: initdb error: "The current directory is invalid." - Mailing list pgsql-bugs

From Thomas Kellerer
Subject Re: Window2012R2: initdb error: "The current directory is invalid."
Date
Msg-id n7l8us$ecq$1@ger.gmane.org
Whole thread Raw
In response to Window2012R2: initdb error: "The current directory is invalid."  (Huong Dangminh <huo-dangminh@ys.jp.nec.com>)
Responses Re: Window2012R2: initdb error: "The current directory is invalid."
List pgsql-bugs
Huong Dangminh schrieb am 19.01.2016 um 11:49:
> I have failed in execute initdb in "c:\Windows\Temp\dir" folder as
> reproduce logs below. The OS's messages "The current directory is invalid."
> was returned.

c:\Windows has special protection and it is not really surprising that a
regular user isn't allowed to write into that directory.

When Postgres is started it drops all "Administrator" privileges
for security reasons (older versions would refuse to start as
Administrator) - and I think initdb is doing the same thing.
So it's understandable that it can't write to c:\Windows

Putting application data into c:\Windows (or "c:\Program Files" for that matter)
is an extremely bad idea to begin with (c:\Windows being even worse than "c:\Program Files")

You shouldn't be doing that anyway.

Thomas

pgsql-bugs by date:

Previous
From: Huong Dangminh
Date:
Subject: Window2012R2: initdb error: "The current directory is invalid."
Next
From: "Dang Minh Huong"
Date:
Subject: Re: Window2012R2: initdb error: "The current directory is invalid."