pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Michael Paquier <michael@paquier.xyz>
To: Stephen Frost <sfrost@snowman.net>
Cc: pgsql-committers@lists.postgresql.org
Subject: Re: pgsql: Prevent running pg_basebackup as root
Date: Thu, 6 Feb 2020 16:04:17 +0900
Message-ID: <20200206070417.GJ23913@paquier.xyz> (raw)
In-Reply-To: <20200205172259.GW3195@tamriel.snowman.net>
References: <E1ixp9U-0005XS-59@gemulon.postgresql.org>
	<20200205172259.GW3195@tamriel.snowman.net>

On Wed, Feb 05, 2020 at 12:22:59PM -0500, Stephen Frost wrote:
> In any case, sorry for not responding on this sooner (was traveling for
> FOSDEM and such), but I'm not really convinced this is something we want
> and it certainly breaks at least somewhat reasonable use-cases when you
> think about using pg_basebackup with -Ft.  In that vein, this change is
> kinda like saying "you can't run pg_dump as root"..

It seems to me that this is entirely different than the case of
pg_dump, as it is possible to restore a dump even as root, something
that cannot happen with physical backups without an extra chmod -R.
You have a point with -Ft as untaring the tarballs from a base backup
taken with pg_basebackup -Ft used by root generates files owned by the
original user.  -Fp enforces the files to be owned by the user taking
the backup, which makes the most sense, so for consistency with the
other tools preventing root to run pg_basebackup makes sense to me
with -Fp.  Any thoughts from others to restrict the tool with -Fp but 
not with -Ft?  The argument of consistency mattered for me first for
both formats.
--
Michael

Attachments:

  signature.asc (application/pgp-signature, 832B) download

view thread (9+ messages)  latest in thread

Message-ID: <20200206070417.GJ23913@paquier.xyz>
Permalink:  ../20200206070417.GJ23913@paquier.xyz/
Also on:    postgresql.org/message-id/20200206070417.GJ23913@paquier.xyz

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-committers@postgresql.org
  Cc: michael@paquier.xyz, sfrost@snowman.net
  Subject: Re: pgsql: Prevent running pg_basebackup as root
  In-Reply-To: <20200206070417.GJ23913@paquier.xyz>
  References: <E1ixp9U-0005XS-59@gemulon.postgresql.org> <20200205172259.GW3195@tamriel.snowman.net> <20200206070417.GJ23913@paquier.xyz>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox