Re: pg_basebackup ignores the existing data directory permissions

From: Haribabu Kommi <kommi(dot)haribabu(at)gmail(dot)com>
To: Peter Eisentraut <peter(dot)eisentraut(at)2ndquadrant(dot)com>
Cc: Magnus Hagander <magnus(at)hagander(dot)net>, Michael Paquier <michael(at)paquier(dot)xyz>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: pg_basebackup ignores the existing data directory permissions
Date: 2019-03-09 01:19:43
Message-ID: CAJrrPGeiF6uZqygY_0bhrF6V9dhepMQVWBCWrn4f_N9Q2sGj=A@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Fri, Mar 8, 2019 at 11:59 PM Peter Eisentraut <
peter(dot)eisentraut(at)2ndquadrant(dot)com> wrote:

> pg_basebackup copies the data directory permission mode from the
> upstream server. But it doesn't copy the ownership. So if say the
> upstream server allows group access and things are owned by
> postgres:postgres, and I want to make a copy for local development and
> make a backup into a directory owned by peter:staff without group
> access, then it would be inappropriate for pg_basebackup to change the
> permissions on that directory.
>

Yes, I agree that it may be a problem if the existing data directory
permissions
are 0700 to changing it to 0750. But it may not be a problem for the
scenarios,
where the existing data permissions >=0750, to the upstream permissions.
Because user must need to change anyway to start the server, otherwise
server
start fails, and also the files inside the data folder follows the
permissions of the
upstream data directory.

usually production systems follows same permissions are of upstream, I don't
see a problem in following the same for development environment also?

comments?

Regards,
Haribabu Kommi
Fujitsu Australia

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Michael Paquier 2019-03-09 01:28:55 Re: Reaping Temp tables to avoid XID wraparound
Previous Message Michael Paquier 2019-03-09 01:15:37 Re: pgsql: Improve autovacuum logging for aggressive and anti-wraparound ru