Re: pg_basebackup ignores the existing data directory permissions

From: Michael Paquier <michael(at)paquier(dot)xyz>
To: Robert Haas <robertmhaas(at)gmail(dot)com>
Cc: Peter Eisentraut <peter(dot)eisentraut(at)2ndquadrant(dot)com>, Magnus Hagander <magnus(at)hagander(dot)net>, Stephen Frost <sfrost(at)snowman(dot)net>, Haribabu Kommi <kommi(dot)haribabu(at)gmail(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: pg_basebackup ignores the existing data directory permissions
Date: 2019-03-22 00:42:36
Message-ID: 20190322004236.GL20192@paquier.xyz
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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(at)paquier(dot)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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Takuma Hoshiai 2019-03-22 00:45:09 Re: Proposal to suppress errors thrown by to_reg*()
Previous Message Michael Paquier 2019-03-22 00:36:11 Re: PostgreSQL pollutes the file system