Re: pg_basebackup ignores the existing data directory permissions

From: Haribabu Kommi <kommi(dot)haribabu(at)gmail(dot)com>
To: Michael Paquier <michael(at)paquier(dot)xyz>
Cc: PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: pg_basebackup ignores the existing data directory permissions
Date: 2019-02-13 07:42:36
Message-ID: CAJrrPGe16KTCaQ6wn9+iJTROatR3kJRt7oVQGXwiofL6+Ue1Rg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Wed, Feb 13, 2019 at 12:42 PM Michael Paquier <michael(at)paquier(dot)xyz>
wrote:

> On Tue, Feb 12, 2019 at 06:03:37PM +1100, Haribabu Kommi wrote:
> > During the testing allow group access permissions on the standby database
> > directory, one of my colleague found the issue, that pg_basebackup
> > doesn't verify whether the existing data directory has the required
> > permissions or not? This issue is not related allow group access
> > permissions. This problem was present for a long time, (I think from
> > the time the pg_basebackup was introduced).
>
> In which case this would cause the postmaster to fail to start.
>

Yes, the postmaster fails to start, but I feel if pg_basebackup takes care
of correcting the file permissions automatically like initdb, that will be
good.

> > Attached patch fixes the problem similar like initdb by changing the
> > permissions of the data
> > directory to the required permissions.
>
> It looks right to me and takes care of the case where group access is
> allowed. Still, we have not seen any complains about the current
> behavior either and pg_basebackup is around for some time already, so
> I would tend to not back-patch that. Any thoughts from others?
>

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.

Regards,
Haribabu Kommi
Fujitsu Australia

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Sergei Kornilov 2019-02-13 07:53:44 Re: Planning counters in pg_stat_statements (using pgss_store)
Previous Message Amit Langote 2019-02-13 07:41:01 Re: obsolete comment above index_pages_fetched