PostgreSQL Bugs

Collected from the PG bugs email list.

Bug ID15502
PG Version11.1
OSDebian GNU/Linux
Opened2018-11-13 23:31:40+00
Reported byKevin Locke
StatusNew

Body of first available message related to this bug follows.

The following bug has been logged on the website:

Bug reference:      15502
Logged by:          Kevin Locke
Email address:      (redacted)
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

Messages

DateAuthorSubject
2018-11-13 23:31:40+00=?utf-8?q?PG_Bug_reporting_form?=BUG #15502: pg_dump -Fd does not honor umask