© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
SupabaseS
Supabase•8mo ago•
2 replies
bukubook-fatigue

storage 403 error

I created a custom bucket and defined RLS policies for
storage.objects
storage.objects
using the Supabase UI.

CREATE POLICY "everything 1ffg0oo_0" ON storage.objects FOR SELECT TO service_role USING (bucket_id = 'images');
CREATE POLICY "everything 1ffg0oo_1" ON storage.objects FOR INSERT TO service_role WITH CHECK (bucket_id = 'images');
CREATE POLICY "everything 1ffg0oo_2" ON storage.objects FOR DELETE TO service_role USING (bucket_id = 'images');
CREATE POLICY "everything 1ffg0oo_3" ON storage.objects FOR UPDATE TO service_role USING (bucket_id = 'images');
CREATE POLICY "everything 1ffg0oo_0" ON storage.objects FOR SELECT TO service_role USING (bucket_id = 'images');
CREATE POLICY "everything 1ffg0oo_1" ON storage.objects FOR INSERT TO service_role WITH CHECK (bucket_id = 'images');
CREATE POLICY "everything 1ffg0oo_2" ON storage.objects FOR DELETE TO service_role USING (bucket_id = 'images');
CREATE POLICY "everything 1ffg0oo_3" ON storage.objects FOR UPDATE TO service_role USING (bucket_id = 'images');



Yesterday, everything worked fine — the policies allowed access as expected.

{statusCode: "403", error: "Unauthorized", message: "new row violates row-level security policy"}
{statusCode: "403", error: "Unauthorized", message: "new row violates row-level security policy"}


However, after running a DB reset and reapplying the exact same policies, they no longer work. I'm getting 403 errors when trying to access the storage, even though nothing has changed in the code or policy definitions.

I'm using Next.js and uploading via the service_role key on the server side. I've double-checked the key and configuration multiple times, so I believe that's not the issue.
2025-06-24_152001.png
Supabase banner
SupabaseJoin
Supabase gives you the tools, documentation, and community that makes managing databases, authentication, and backend infrastructure a lot less overwhelming.
45,816Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

403 error
SupabaseSSupabase / help-and-questions
13mo ago
Supabase Storage file upload - 403 Unauthorized
SupabaseSSupabase / help-and-questions
7mo ago
Supabase Storage error
SupabaseSSupabase / help-and-questions
3mo ago
Supabase Storage Error
SupabaseSSupabase / help-and-questions
4mo ago