Re: About "ERROR: must be *superuser* to COPY to or from a file"

From: Greg Stark <gsstark(at)mit(dot)edu>
To: Douglas McNaught <doug(at)mcnaught(dot)org>
Cc: emilu(at)cs(dot)concordia(dot)ca, pgsql-general(at)postgresql(dot)org
Subject: Re: About "ERROR: must be *superuser* to COPY to or from a file"
Date: 2005-08-26 22:04:52
Message-ID: 87y86o8id7.fsf@stark.xeocode.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general


Douglas McNaught <doug(at)mcnaught(dot)org> writes:

> You can use \copy in 'psql' on the client side, but you have to be a
> superuser to do COPY on the server side, for security reasons.

I wonder if there's any way to relax this constraint.

If you're connected via a unix domain socket we can know the UID of the client
end. I don't see reproducing the entire unix semantics but if file is owned by
the same uid as the user connecting it seems like it ought to be safe.

--
greg

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Douglas McNaught 2005-08-26 22:24:08 Re: About "ERROR: must be *superuser* to COPY to or from a file"
Previous Message Matt A. 2005-08-26 21:59:50 Altering functions cast