Re: Grant on lo_export()

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Nelson Gonzaga <ngonzaga(at)yahoo(dot)com>
Cc: "pgsql-admin(at)lists(dot)postgresql(dot)org" <pgsql-admin(at)lists(dot)postgresql(dot)org>
Subject: Re: Grant on lo_export()
Date: 2018-08-01 14:06:06
Message-ID: 27170.1533132366@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

Nelson Gonzaga <ngonzaga(at)yahoo(dot)com> writes:
> Hi all,I'm trying to use lo_import / lo_export and apparently I have permission denied:
> command:select lo_export(oid_imagem, '/tmp2/erro_export1.png') fromimagem where nome_imagem = 'erro';
> ERROR: must be superuser to use server-side lo_export()
> SQL state:42501
> Hint:Anyone can use the client-side lo_export() provided by libpq.

The error message means exactly what it says.

As of v11 it'll be possible to grant usage of lo_export() to
non-superusers, but in all released branches that check is hard-wired.

Note that since you can use that function to overwrite PG data or config
files, granting use of it to someone you wouldn't trust with full
superuser would be a damfool idea anyway.

regards, tom lane

In response to

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message Mark Steben 2018-08-01 16:22:18 postgres port 5434 not being allowed when remote server is accessing
Previous Message Nelson Gonzaga 2018-08-01 11:12:41 Grant on lo_export()