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