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

From: markus(at)braeunig(dot)biz
To: pgsql-bugs(at)postgresql(dot)org
Subject: BUG #14586: Permissions of recovery.conf are different in plain and tar-format
Date: 2017-03-10 08:00:45
Message-ID: 20170310080045.1429.76929@wrigleys.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

The following bug has been logged on the website:

Bug reference: 14586
Logged by: Markus Bräunig
Email address: markus(at)braeunig(dot)biz
PostgreSQL version: 9.6.2
Operating system: CentOS Linux release 7.3.1611
Description:

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.

Regards
Markus

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message milos.urbanek 2017-03-10 15:53:18 BUG #14587: Foreign constraint with newline blows up pg_restore catalogue
Previous Message Kieran McCusker 2017-03-09 18:14:49 Re: BUG #14583: plpythonu : subprocess not working in function