Received: from sss.sss.pgh.pa.us (sss.pgh.pa.us [209.114.166.2]) by hub.org (8.9.3/8.9.3) with ESMTP id XAA80020 for ; Sat, 20 Nov 1999 23:24:24 -0500 (EST) (envelope-from tgl@sss.pgh.pa.us) Received: from sss.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.sss.pgh.pa.us (8.9.1/8.9.1) with ESMTP id XAA24906; Sat, 20 Nov 1999 23:22:43 -0500 (EST) To: Lamar Owen , "pgsql-interfaces@postgreSQL.org" Subject: Re: [INTERFACES] pg_pwd In-reply-to: Your message of Sat, 20 Nov 1999 21:25:00 -0500 <23778.943151100@sss.pgh.pa.us> Date: Sat, 20 Nov 1999 23:22:42 -0500 Message-ID: <24903.943158162@sss.pgh.pa.us> From: Tom Lane >> Hmmm... Can a parameter be passed to COPY giving the file create mode? > Yes, that was what I was thinking of. I have committed changes to current CVS that (a) ensure that pg_pwd is written with mode 600, (b) reduce the permissions of other files written by backend-side COPY to 644, instead of 666 as they were; (c) if initdb is pointed at a pre-existing PGDATA directory, it does chmod go-rwx on the dir to be sure its permissions are not too loose. (As a free byproduct, this also verifies that the dir is owned by postgres...) I am not 100% comfortable with backpatching these changes into REL6_5, however, since I had to change the way that the CREATE/ALTER USER commands invoke COPY. So I think I will just leave them in the 7.0 code and not back-patch. As an immediate fix, I suggest regenerating the RH RPMs so that /var/lib/pgsql is created with mode 700 not 755. regards, tom lane