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

From Haribabu Kommi
Subject Re: pg_basebackup ignores the existing data directory permissions
Date
Msg-id CAJrrPGdNFP_pe5yfUQdxEWEX5ocAGcVaeMr-OxNE=gA7E=a5Ww@mail.gmail.com
Whole thread Raw
In response to Re: pg_basebackup ignores the existing data directory permissions  (Michael Paquier <michael@paquier.xyz>)
Responses Re: pg_basebackup ignores the existing data directory permissions  (Michael Paquier <michael@paquier.xyz>)
List pgsql-hackers

On Thu, Feb 14, 2019 at 3:04 PM Michael Paquier <michael@paquier.xyz> wrote:
On Wed, Feb 13, 2019 at 06:42:36PM +1100, Haribabu Kommi wrote:
> This should back-patch till 11 where the group access is introduced.
> Because of lack of complaints, I agree with you that there is no need of
> further back-patch.

I am confused by the link with group access.

Apologies to confuse you by linking it with group access. This patch doesn't
have an interaction with group access. From v11 onwards, PostgreSQL server
accepts two set of permissions for the data directory because of group access. 

we have an application that is used to create the data directory with
owner access (0700), but with initdb group permissions option, it automatically
converts to (0750) by the initdb. But pg_basebackup doesn't change it when
it tries to do a backup from a group access server.
 
The patch you are
sending is compatible down to v11, but we could also do it further
down by just using chmod with S_IRWXU on the target folder if it
exists and is empty.

Yes, I agree with you that by changing chmod as you said fixes it in the
back-branches. 

Regards,
Haribabu Kommi
Fujitsu Australia

pgsql-hackers by date:

Previous
From: Kyotaro HORIGUCHI
Date:
Subject: Re: replace_text optimization (StringInfo to varlena)
Next
From: "Higuchi, Daisuke"
Date:
Subject: [Bug Fix] ECPG: could not use some CREATE TABLE AS syntax