Re: Proposing COPY .. WITH PERMISSIVE

From: dinesh kumar <dineshkumar02(at)gmail(dot)com>
To: Robert Haas <robertmhaas(at)gmail(dot)com>
Cc: Andres Freund <andres(at)anarazel(dot)de>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Proposing COPY .. WITH PERMISSIVE
Date: 2015-07-23 16:19:07
Message-ID: CALnrH7osVrWHp4ksS-ciwW_T6WczrT1+uG25oWwTBe0ZW+CZFQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi Robert/Andres,

On Thu, Jul 23, 2015 at 8:34 AM, Robert Haas <robertmhaas(at)gmail(dot)com> wrote:

> On Thu, Jul 23, 2015 at 11:32 AM, Andres Freund <andres(at)anarazel(dot)de>
> wrote:
> > On 2015-07-23 11:26:27 -0400, Robert Haas wrote:
> >> On Wed, Jul 22, 2015 at 11:29 PM, dinesh kumar <dineshkumar02(at)gmail(dot)com>
> wrote:
> >> > Would like to propose PERMISSIVE mode for the COPY created out files.
> >> > I mean, at this moment, if do "COPY" as postgres instance owner, i
> can able
> >> > to read the file as non instance user as well, and would like to
> restrict
> >> > this to
> >> > instance owner WITH PERMISSIVE option.
> >> >
> >> > Let me know your thoughts on this.
> >>
> >> I don't understand the proposal.
> >
> > I understand it as PERMISSIVE := chmod 777 the target file of a COPY TO.
>
> That doesn't sound like an especially good idea. What if I want mode 770?
>
>
Sorry for my unclear description about the proposal.

"WITH PERMISSIVE" is equal to our existing behavior. That is, chmod=644 on
the created files.

If User don't specify "PERMISSIVE" as an option, then the chmod=600 on
created files. In this way, we can restrict the other users from reading
these files.

Let me know if i am still bad at explaining things here.

Thanks in advance.

Regards,
Dinesh
manojadinesh.blogspot.com

--
> Robert Haas
> EnterpriseDB: http://www.enterprisedb.com
> The Enterprise PostgreSQL Company
>

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Haas 2015-07-23 16:20:01 Re: pgbench stats per script & other stuff
Previous Message Fabien COELHO 2015-07-23 16:15:24 Re: pgbench stats per script & other stuff