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

Поиск
Список
Период
Сортировка
От Greg Stark
Тема Re: About "ERROR: must be *superuser* to COPY to or from a file"
Дата
Msg-id 87y86o8id7.fsf@stark.xeocode.com
обсуждение исходный текст
Ответ на Re: About "ERROR: must be *superuser* to COPY to or from a file"  (Douglas McNaught <doug@mcnaught.org>)
Ответы Re: About "ERROR: must be *superuser* to COPY to or from a file"  (Douglas McNaught <doug@mcnaught.org>)
Re: About "ERROR: must be *superuser* to COPY to or from a file"  (Michael Fuhr <mike@fuhr.org>)
Список pgsql-general
Douglas McNaught <doug@mcnaught.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

В списке pgsql-general по дате отправления:

Предыдущее
От: "Matt A."
Дата:
Сообщение: Altering functions cast
Следующее
От: Douglas McNaught
Дата:
Сообщение: Re: About "ERROR: must be *superuser* to COPY to or from a file"