Change backend-side COPY to write files with permissions 644 not 666

Tom Lane <tgl@sss.pgh.pa.us>

Commit: d8ba3dfb0b3385350d512fd6d56c83c244c98016
Author: Tom Lane <tgl@sss.pgh.pa.us>
Date: 1999-11-21T04:16:17Z
Releases: 7.1.1
Change backend-side COPY to write files with permissions 644 not 666
(whoever thought world-writable files were a good default????).  Modify
the pg_pwd code so that pg_pwd is created with 600 permissions.  Modify
initdb so that permissions on a pre-existing PGDATA directory are not
blindly accepted: if the dir is already there, it does chmod go-rwx
to be sure that the permissions are OK and the dir actually is owned
by postgres.

Files

PathChange+/−
src/backend/commands/copy.c modified +9 −4
src/backend/commands/user.c modified +22 −13
src/backend/tcop/utility.c modified +6 −2
src/bin/initdb/initdb.sh modified +9 −1
src/include/commands/copy.h modified +3 −3