Re: pg_basebackup ignores the existing data directory permissions - Mailing list pgsql-hackers

From Michael Paquier
Subject Re: pg_basebackup ignores the existing data directory permissions
Date
Msg-id 20190322004236.GL20192@paquier.xyz
Whole thread Raw
In response to Re: pg_basebackup ignores the existing data directory permissions  (Robert Haas <robertmhaas@gmail.com>)
Responses Re: pg_basebackup ignores the existing data directory permissions
Re: pg_basebackup ignores the existing data directory permissions
List pgsql-hackers
On Thu, Mar 21, 2019 at 02:56:24PM -0400, Robert Haas wrote:
> On Tue, Mar 19, 2019 at 2:29 AM Michael Paquier <michael@paquier.xyz> wrote:
>> Hm.  We have been assuming that the contents of a base backup inherit
>> the permission of the source when using pg_basebackup because this
>> allows users to keep a nodes in a consistent state without deciding
>> which option to use.  Do you mean that you would like to enforce the
>> permissions of only the root directory if it exists?  Or the root
>> directory with all its contents?  The former may be fine.  The latter
>> is definitely not.
>
> Why not?

Because we have released v11 so as we respect the permissions set on
the source instead from which the backup is taken for all the folder's
content.  If we begin to enforce it we may break some cases.  If a new
option is introduced, it seems to me that the default should remain
what has been released with v11, but that it is additionally possible
to enforce group permissions or non-group permissions at will on the
backup taken for all the contents in the data folder, including the
root folder, created manually or not before running the pg_basebackup
command.
--
Michael

Attachment

pgsql-hackers by date:

Previous
From: Michael Paquier
Date:
Subject: Re: PostgreSQL pollutes the file system
Next
From: Takuma Hoshiai
Date:
Subject: Re: Proposal to suppress errors thrown by to_reg*()