Re: BUG #15810: Using custom directory on external HDD gives permission error

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Michael Paquier <michael(at)paquier(dot)xyz>
Cc: omerfaruko(at)gmail(dot)com, pgsql-bugs(at)lists(dot)postgresql(dot)org
Subject: Re: BUG #15810: Using custom directory on external HDD gives permission error
Date: 2019-05-16 23:59:33
Message-ID: 9610.1558051173@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

Michael Paquier <michael(at)paquier(dot)xyz> 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

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Amit Langote 2019-05-17 00:51:58 Re: inconsistent results querying table partitioned by date
Previous Message Michael Paquier 2019-05-16 23:43:51 Re: BUG #15810: Using custom directory on external HDD gives permission error