From: PG Bug reporting form <noreply@postgresql.org>
To: pgsql-bugs@lists.postgresql.org
Cc: kevin@kevinlocke.name
Subject: BUG #15502: pg_dump -Fd does not honor umask
Date: Tue, 13 Nov 2018 23:31:40 +0000
Message-ID: <15502-891a0555f33c7d82@postgresql.org> (raw)
The following bug has been logged on the website:
Bug reference: 15502
Logged by: Kevin Locke
Email address: kevin@kevinlocke.name
PostgreSQL version: 11.1
Operating system: Debian GNU/Linux
Description:
The backup file created by `pg_dump -f <path> <db name>` has file
permissions which correspond to the umask for -Fp (plain format), -Fc
(custom format), and -Ft (tar format). For -Fd (directory format) the .dat
files match the umask, but the containing directory never has group or world
permissions, regardless of the umask. For example:
$ umask 002 && pg_dump -Fd -f postgres-dump postgres && ls -al
postgres-dump
total 4
drwx------ 2 postgres postgres 60 Nov 13 16:23 .
drwxrwxrwt 23 root root 600 Nov 13 16:23 ..
-rw-r--r-- 1 postgres postgres 1032 Nov 13 16:23 toc.dat
The postgres-dump directory is created with mode 0700 instead of 0775 which
would be expected based on the umask (e.g. if mkdir were invoked before
pg_dump).
This does not appear to be a security issue, since the permissions are
always more restrictive than the umask. It is an inconsistency and minor
annoyance for users which I thought you might like to fix.
Thanks for considering,
Kevin
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-bugs@postgresql.org
Cc: noreply@postgresql.org, kevin@kevinlocke.name
Subject: Re: BUG #15502: pg_dump -Fd does not honor umask
In-Reply-To: <15502-891a0555f33c7d82@postgresql.org>
References: <15502-891a0555f33c7d82@postgresql.org>
* 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