Thread: 777 permissions on basebackup directory

777 permissions on basebackup directory

From
prakhar jauhari
Date:
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.

Regards,
Prakhar.

Re: 777 permissions on basebackup directory

From
Magnus Hagander
Date:
On Tue, Jul 16, 2013 at 5:42 AM, prakhar jauhari <prak840@gmail.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/