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

From Dang Minh Huong
Subject Re: Window2012R2: initdb error: "The current directory is invalid."
Date
Msg-id 041201d152bf$a508bee0$ef1a3ca0$@gmail.com
Whole thread Raw
In response to Re: Window2012R2: initdb error: "The current directory is invalid."  (Thomas Kellerer <spam_eater@gmx.net>)
Responses Re: Window2012R2: initdb error: "The current directory is invalid."
List pgsql-bugs
Hi,

Thanks for reply sir,

> -----Original Message-----
> From: pgsql-bugs-owner@postgresql.org [mailto:pgsql-bugs-
> owner@postgresql.org] On Behalf Of Thomas Kellerer
> Sent: 19 Tha=CC=81ng Gi=C3=AAng 2016 9:08 CH
> To: pgsql-bugs@postgresql.org
> Subject: Re: [BUGS] Window2012R2: initdb error: "The current directory =
is
> invalid."
>=20
> 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.
>=20
> c:\Windows has special protection and it is not really surprising that =
a regular
> user isn't allowed to write into that directory.
>=20
> 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
>=20

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")
>=20
> You shouldn't be doing that anyway.
>=20
> Thomas
>=20

Thanks and best regards,
bocap.

>=20
>=20
> --
> Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make
> changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-bugs
>=20
> -----
> 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

pgsql-bugs by date:

Previous
From: Thomas Kellerer
Date:
Subject: Re: Window2012R2: initdb error: "The current directory is invalid."
Next
From: "Aaron W. Swenson"
Date:
Subject: Re: BUG #13873: Pg_upgrade problem from 9.4 to 9.5