Rowpass 42501: permission denied for table Not affiliated with Supabase

Rowpass / Guides

"Grant the required privileges to the current role with: GRANT ..."

The hint names one missing grant. Paste it and get the full set.

Write the fix for your tables

 

Waiting for a paste.

    Who can reach each table

    Your tables show up here, one row each, with a choice of who can reach them.

    The SQL appears here as soon as a table is found.

    Parsed in your browser. Your SQL is never uploaded, and no site or database is scanned.

    Reading the hint

    GRANT SELECT ON public.your_table TO anon;
    PartMeaning
    SELECTThe privilege the failed request needed. A read needs SELECT; a write needs INSERT, UPDATE or DELETE.
    public.your_tableSchema and table that were refused.
    anonThe role the request ran as. anon is a signed-out visitor, authenticated a signed-in user.

    Why running the hint alone is rarely enough

    • It covers one privilege. Reads work, then the first save fails with a new hint for INSERT.
    • It covers one role. Signed-out pages work, signed-in pages fail, or the other way round.
    • It says nothing about rows. A grant without row level security and policies can expose every row to that role.
    • The role in the hint is the one that made the request, which may not be the one that should have access. A hint naming anon on a private table often means the user was not signed in.

    The tool reads the table and role from a pasted error and proposes a full set you can adjust. It starts from the closed side: a hint that names anon starts as Private, a hint that names authenticated starts as Owner only. Public read is never preselected from a hint, and choosing it shows a warning.

    If the error says "view"

    permission denied for view your_view is a different case, and the tool writes no SQL for it. A view cannot have row level security of its own. Grant select on the view to the role that reads it, create the view with security_invoker = true (Postgres 15 and later) so the policies of its base tables apply, and fix the grants and policies on those base tables.

    Questions

    The hint says anon, and my data is private. What now?

    Do not grant anon. Choose Owner only (or keep Private if only your server reads it), and check that your app sends the signed-in user's session with the request.

    Sources

    Related

    Did it fix your error?