Re: FW: GRANT question

From: Együd Csaba (Freemail) <csegyud(at)freemail(dot)hu>
To: 'Michael Fuhr' <mike(at)fuhr(dot)org>, 'Tom Lane' <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: FW: GRANT question
Date: 2005-11-27 07:02:37
Message-ID: 0IQL00CBZQ6L9H70@invitel.hu
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Dear Michael, Tom,
thak you very much! Now it works well.

moson.gdb=> SELECT public.edenproc_usesysid('probauser');
ERROR: permission denied for schema public
moson.gdb=> select current_schemas(true);
current_schemas
-----------------
{pg_catalog}
(1 row)

moson.gdb=# GRANT USAGE ON SCHEMA PUBLIC TO probauser;
GRANT
moson.gdb=# select current_schemas(true);
current_schemas
---------------------
{pg_catalog,public}
(1 row)

moson.gdb=# SELECT edenproc_usesysid('probauser');
edenproc_usesysid
-------------------
118
(1 row)

Best Regards,
-- Csaba Együd

-----Original Message-----
From: Michael Fuhr [mailto:mike(at)fuhr(dot)org]
Sent: Saturday, November 26, 2005 10:16 PM
To: Együd Csaba (Freemail)
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: FW: [GENERAL] GRANT question

On Sat, Nov 26, 2005 at 09:37:00PM +0100, Egyd Csaba (Freemail) wrote:
> moson.gdb=> SELECT oid::regprocedure FROM pg_proc WHERE proname ILIKE
> '%eden%';
[...]
> public.edenproc_usesysid(text)

Hmmm...so the function indeed exists in the public schema. What happens if
you call the schema-qualified function? What are the permissions on the
schema itself?

SELECT public.edenproc_usesysid('probauser');
SELECT * FROM pg_namespace WHERE nspname = 'public';

If the first query fails with "permission denied for schema public"
then you probably need to grant at least USAGE on the public schema to
certain users. That would imply that somebody has changed the default
permissions on public, either in this database or in the template datbase
from which it was created (template1 by default).

--
Michael Fuhr

--
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.1.362 / Virus Database: 267.13.8/183 - Release Date: 2005.11.25.

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Együd Csaba 2005-11-27 11:32:06 Login limitation?
Previous Message Tom Lane 2005-11-27 06:54:36 Re: GRANT question