Re: 777 permissions on basebackup directory

From: Magnus Hagander <magnus(at)hagander(dot)net>
To: prakhar jauhari <prak840(at)gmail(dot)com>
Cc: "pgsql-admin(at)postgresql(dot)org" <pgsql-admin(at)postgresql(dot)org>
Subject: Re: 777 permissions on basebackup directory
Date: 2013-07-16 08:39:34
Message-ID: CABUevEz3aD8BzLfdz_O43Q+Qj8Ric3izWC+=z3zDFZaOxDb_dA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

On Tue, Jul 16, 2013 at 5:42 AM, prakhar jauhari <prak840(at)gmail(dot)com> wrote:
> Hi all,
> I am currently using postgresql 9.2 installation.
> While taking base backups using pg_basebackup utility, I noticed that
> permissions of the directory which i specify for base backup are set to 777.
> Does postgesql need such lenient permissions to work, coz 777 on Db
> directory seems a security concern to me.

PostgreSQL does not care about the permissions on the backup directory
used, and does not set them to 777. In fact, it sets them to to be
accessible only by the owner, so clearly something else is setting
those permissions for you.

It will copy any permissions *inside* the data directory for you, so
if you see 777 there, it means that you have those permissions
somewhere in your production data directory as well.

--
Magnus Hagander
Me: http://www.hagander.net/
Work: http://www.redpill-linpro.com/

In response to

Browse pgsql-admin by date

  From Date Subject
Next Message Bruce Momjian 2013-07-16 09:58:55 Re: Upgrading from 9.1 to 9.2 - master AND slave
Previous Message prakhar jauhari 2013-07-16 04:42:06 777 permissions on basebackup directory