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 CAJrrPGeiF6uZqygY_0bhrF6V9dhepMQVWBCWrn4f_N9Q2sGj=A@mail.gmail.com
Whole thread Raw
In response to Re: pg_basebackup ignores the existing data directory permissions  (Peter Eisentraut <peter.eisentraut@2ndquadrant.com>)
Responses Re: pg_basebackup ignores the existing data directory permissions
List pgsql-hackers

On Fri, Mar 8, 2019 at 11:59 PM Peter Eisentraut <peter.eisentraut@2ndquadrant.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

pgsql-hackers by date:

Previous
From: Michael Paquier
Date:
Subject: Re: pgsql: Improve autovacuum logging for aggressive andanti-wraparound ru
Next
From: Michael Paquier
Date:
Subject: Re: Reaping Temp tables to avoid XID wraparound