Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hRQHk-0003T8-IV for pgsql-bugs@arkaria.postgresql.org; Thu, 16 May 2019 23:59:40 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1hRQHh-0002g7-JS for pgsql-bugs@arkaria.postgresql.org; Thu, 16 May 2019 23:59:37 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hRQHh-0002g0-8g for pgsql-bugs@lists.postgresql.org; Thu, 16 May 2019 23:59:37 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hRQHe-0004Oz-VE for pgsql-bugs@lists.postgresql.org; Thu, 16 May 2019 23:59:36 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id x4GNxX8Y009611; Thu, 16 May 2019 19:59:33 -0400 From: Tom Lane To: Michael Paquier cc: omerfaruko@gmail.com, pgsql-bugs@lists.postgresql.org Subject: Re: BUG #15810: Using custom directory on external HDD gives permission error In-reply-to: <20190516234351.GC20887@paquier.xyz> References: <15810-c9f666eb398e40b7@postgresql.org> <20190516234351.GC20887@paquier.xyz> Comments: In-reply-to Michael Paquier message dated "Fri, 17 May 2019 08:43:51 +0900" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <9609.1558051173.1@sss.pgh.pa.us> Date: Thu, 16 May 2019 19:59:33 -0400 Message-ID: <9610.1558051173@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Michael Paquier writes: > On Thu, May 16, 2019 at 04:15:39PM +0000, PG Bug reporting form wrote: >> Is there some way to circumvent this check without changing format >> of the HDD? > That's weird. If the data folder fed to initdb already exists and is > empty, then permissions on the path are enforced to 0700 or 0750 (if > using --allow-group-access) automatically to prevent this error when > starting Postgres for bootstrapping. I think we do a chmod but we don't then check to see if stat reports the correct permissions. IIUC, the reporter is using a filesystem that lacks permissions altogether and is just ignoring the chmod. So later checks fail. I'm kind of disinclined to provide a way to skip the permissions check though, especially in view of the fact that there's no good reason to use a Windows filesystem as native storage for Unix. There are other things that are likely to not work either, eg symlinks for tablespaces. regards, tom lane