Re: [INTERFACES] pg_pwd - Mailing list pgsql-interfaces

From Tom Lane
Subject Re: [INTERFACES] pg_pwd
Date
Msg-id 24903.943158162@sss.pgh.pa.us
Whole thread Raw
In response to Re: [INTERFACES] pg_pwd  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-interfaces
>> 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


pgsql-interfaces by date:

Previous
From: maxsbox
Date:
Subject: mailing list
Next
From: coyotitos_house@juno.com
Date:
Subject: ECPG FETCH [number|ALL] IN cursor_name... with host variable