BUG #15502: pg_dump -Fd does not honor umask - Mailing list pgsql-bugs

From PG Bug reporting form
Subject BUG #15502: pg_dump -Fd does not honor umask
Date
Msg-id 15502-891a0555f33c7d82@postgresql.org
Whole thread Raw
List pgsql-bugs
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


pgsql-bugs by date:

Previous
From: PG Bug reporting form
Date:
Subject: BUG #15501: postgresql 9.6.11 packages missing from rhel6 64bit repos
Next
From: PG Bug reporting form
Date:
Subject: BUG #15503: Bytea type column select failed when the length of thevalue is more than 512M