Permission denied for table
Your AI created a new 'invoices' table. Every page that reads it now fails, for every user, even you. looks fine.
This answers: Why does Supabase say permission denied for table? No coding needed. 2 quick decisions.
- Who may see what
- Where your data lives
- Debugging without panic
Checking your access…
Why does Supabase say permission denied for table?
The message 'permission denied for table' (error 42501) means the role making the request has no grant to use that table at all, so never runs. Since 30 October 2026, new tables are not exposed to the until you grant access. Grant only the access each role needs, such as select to authenticated, and keep RLS policies on.
Breaks at Database: No grant on the new table
How it works
| Order | Owner | Total | Maya sees it? |
|---|---|---|---|
| #1042 | Maya | £120 | Yes, hers |
| #1043 | Tom | £80 | Yes: leaked |
| #1044 | Ana | £215 | Yes: leaked |
| #1045 | Maya | £42 | Yes, hers |
Why AI tools write this bug
AI tools create tables with SQL but often skip the grant, then 'fix' the error by granting everything to everyone, which leaves as the only protection.
How to fix it
- Read the message: 'permission denied for table' means a missing grant; 'violates row-level security policy' is .
3 more steps, and a prompt that checks your own app for this bug. Part of Pro.
UnlockCommon questions
- Does turning off RLS fix 'permission denied for table'?
- No. The error comes from a missing grant, which is checked before RLS.