From: | Dang Minh Huong <kakalot49(at)gmail(dot)com> |
---|---|
To: | cpolish(at)surewest(dot)net |
Cc: | 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-21 11:05:37 |
Message-ID: | EA52AB6F-D548-4F06-A45B-08E6443905BB@gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-bugs pgsql-hackers |
Hi,
Thank you all for your advices.
We have simply solved this problem with change the running initdb's folder to not to "c:\windows\temp\something".
Best regards,
bocap.
Ngày 20-01-2016, vào lúc 07:28, cpolish(at)surewest(dot)net viết:
> On 2016-01-19 22:45, Dang Minh Huong wrote:
>>> owner(at)postgresql(dot)org] On Behalf Of Thomas Kellerer
>>> 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.
>
> As Thomas said, it is undesireable to log into a server as
> administrator. You should create and use a privileged user, for
> example dmhadmin, insert that user into the administrators
> group. Also create an ordinary user, perhaps dmh, and log in
> with that account. Download the postgres installer, run it as
> the ordinary user. You will be prompted for a privileged user
> account, enter the priviledged account (for example, dmhadmin).
> When asked for the location to install the database, create a
> new folder named postgres on a non-system (not C:) disk. If your
> server can only have one disk you might install the database in
> C:\postgres, which you'll have the opportunity to create from
> inside the installer's "browse..." dialog. This folder will be
> owned by the local server's "administrators" group with
> appropriate privileges.
>
> C:\Windows\Temp is not an appropriate choice for storing
> persistent program data. If you ignore this by manipulating the
> permissions you will eventually be harmed when a privileged
> program clears the entire contents.
>
> Hope that helps,
> --
> Charles
>
From | Date | Subject | |
---|---|---|---|
Next Message | victor.evangelista | 2016-01-21 16:53:10 | BUG #13880: Different procedures in same SQL |
Previous Message | andreas.dewes | 2016-01-21 11:03:11 | BUG #13879: include_dir directive not working |
From | Date | Subject | |
---|---|---|---|
Next Message | Marcin Mańk | 2016-01-21 11:11:41 | Re: Releasing in September |
Previous Message | Etsuro Fujita | 2016-01-21 10:55:35 | Re: Minor code improvements to create_foreignscan_plan/ExecInitForeignScan |