Re: BUG #14586: Permissions of recovery.conf are different in plain and tar-format

From: Michael Paquier <michael(dot)paquier(at)gmail(dot)com>
To: markus(at)braeunig(dot)biz
Cc: PostgreSQL mailing lists <pgsql-bugs(at)postgresql(dot)org>
Subject: Re: BUG #14586: Permissions of recovery.conf are different in plain and tar-format
Date: 2017-03-13 06:51:47
Message-ID: CAB7nPqQ9st=Hs6vpcxqp0_JVcDK7rn6zSCPb83znSg0yU+s2+A@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

On Fri, Mar 10, 2017 at 5:00 PM, <markus(at)braeunig(dot)biz> wrote:
> The option "--write-recovery-conf" of pg_basebackup creates a valid
> recovery.conf but misses to apply secure file permissions when the default
> format (plain) is used.
>
> If you tar the result (-F t), the recovery.conf inside the base.tar has the
> permissions 0600.
> In plain format the umask of the actual user is applied and the permissions
> are e.g. 0644.
>
> Because plain passwords are possible in this file, I would suggest to unify
> this behavior and change the permissions to 0600 in both cases.

It does not matter much. Backup folder created by pg_basebackup has
0700 as umask.
--
Michael

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Markus Bräunig 2017-03-13 09:08:39 Re: BUG #14586: Permissions of recovery.conf are different in plain and tar-format
Previous Message Neo Liu 2017-03-13 02:36:41 Re: BUG #14588: Postgres process blocked on semop