Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1aLV53-00086I-9n for pgsql-bugs@arkaria.postgresql.org; Tue, 19 Jan 2016 12:08:13 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84) (envelope-from ) id 1aLV52-0002DG-Sg for pgsql-bugs@arkaria.postgresql.org; Tue, 19 Jan 2016 12:08:12 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84) (envelope-from ) id 1aLV52-0002Cu-9f for pgsql-bugs@postgresql.org; Tue, 19 Jan 2016 12:08:12 +0000 Received: from plane.gmane.org ([80.91.229.3]) by magus.postgresql.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:256) (Exim 4.84) (envelope-from ) id 1aLV4y-00040w-OY for pgsql-bugs@postgresql.org; Tue, 19 Jan 2016 12:08:11 +0000 Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1aLV4w-0003Fa-I5 for pgsql-bugs@postgresql.org; Tue, 19 Jan 2016 13:08:06 +0100 Received: from 185.40.248.10 ([185.40.248.10]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 19 Jan 2016 13:08:06 +0100 Received: from spam_eater by 185.40.248.10 with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 19 Jan 2016 13:08:06 +0100 X-Injected-Via-Gmane: http://gmane.org/ To: pgsql-bugs@postgresql.org From: Thomas Kellerer Subject: Re: Window2012R2: initdb error: "The current directory is invalid." Date: Tue, 19 Jan 2016 13:07:55 +0100 Lines: 19 Message-ID: References: <75DB81BEEA95B445AE6D576A0A5C9E9364CAD50F@BPXM05GP.gisp.nec.co.jp> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: 185.40.248.10 User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.23) Gecko/20090812 Thunderbird/2.0.0.23 Mnenhy/0.7.6.666 In-Reply-To: <75DB81BEEA95B445AE6D576A0A5C9E9364CAD50F@BPXM05GP.gisp.nec.co.jp> X-Pg-Spam-Score: 0.4 (/) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-bugs Precedence: bulk Sender: pgsql-bugs-owner@postgresql.org 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 -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs