Menu

Supabase “permission denied for table” (42501) after the Oct 30 change: the fix
📰

Supabase “permission denied for table” (42501) after the Oct 30 change: the fix

DEV Community: express·SYED SHAAMEER Ali·1 day ago
#nUbnGJHY
#devtoexpress#devto#dev#profiles#table
Reading 0:00
15s threshold

You create a new table, add RLS policies that look perfect, and your API calls fail with:

error code 42501: permission denied for table profiles

No policy is wrong. The problem is one layer below RLS, and Supabase’s recent default change is why it suddenly bites. Here is what changed, the exact SQL that fixes it, and a two-user test to prove your policies still hold.

What changed

Supabase no longer automatically grants the API roles (anon, authenticated) access to new tables in the public schema. New projects got this first, and for every project it applies to tables created after Oct 30. Before, a new table was reachable by default and RLS did the filtering. Now you have to grant access explicitly.

Check the exact rollout details in Supabase’s changelog and docs: [LINK TO SUPABASE CHANGELOG/DOCS].

The thing to remember is that there are two separate layers:

• Grants decide whether a role can touch the table at all.

• RLS policies decide which rows that role can see or change.

You need both.…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.