Re: Window2012R2: initdb error: "The current directory is invalid."

From: "Dang Minh Huong" <kakalot49(at)gmail(dot)com>
To: "'Thomas Kellerer'" <spam_eater(at)gmx(dot)net>, <pgsql-bugs(at)postgresql(dot)org>
Subject: Re: Window2012R2: initdb error: "The current directory is invalid."
Date: 2016-01-19 13:45:19
Message-ID: 041201d152bf$a508bee0$ef1a3ca0$@gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs pgsql-hackers

Hi,

Thanks for reply sir,

> -----Original Message-----
> From: pgsql-bugs-owner(at)postgresql(dot)org [mailto:pgsql-bugs-
> owner(at)postgresql(dot)org] On Behalf Of Thomas Kellerer
> Sent: 19 Tháng Giêng 2016 9:08 CH
> To: pgsql-bugs(at)postgresql(dot)org
> Subject: Re: [BUGS] Window2012R2: initdb error: "The current directory is
> invalid."
>
> 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
>

I did not mean, create data cluster in C drive made that error sir.
This issue reproduce in all drive specified in -D option.
# My reproduce environment is only one (C) drive. So, sorry for the log.

I mean, it happen when current directory of command line is "c:\Windows\Temp\something".
It is rare case, and may be a Windows2012's specification, but i don't know
why only "c:\Windows\Temp\something" and are there another case like that?

> 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
>

Thanks and best regards,
bocap.

>
>
> --
> Sent via pgsql-bugs mailing list (pgsql-bugs(at)postgresql(dot)org) To make
> changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-bugs
>
> -----
> No virus found in this message.
> Checked by AVG - www.avg.com
> Version: 2016.0.7303 / Virus Database: 4489/11436 - Release Date: 01/19/16

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Aaron W. Swenson 2016-01-19 14:10:52 Re: BUG #13873: Pg_upgrade problem from 9.4 to 9.5
Previous Message Thomas Kellerer 2016-01-19 12:07:55 Re: Window2012R2: initdb error: "The current directory is invalid."

Browse pgsql-hackers by date

  From Date Subject
Next Message Kevin Grittner 2016-01-19 14:08:43 Re: Advices on custom data type and extension development
Previous Message Amit Kapila 2016-01-19 13:33:41 Re: Re: [JDBC] 9.4-1207 behaves differently with server side prepared statements compared to 9.2-1102