permission denied for table #35757
|
I'm having an issue in my database where I can't seem to access my tables via api or in the web client in any role other than postgres. I get the response: when using the postgREST api, and this is the kind of error message I get when I set my role to anon on my dashboard and try to view my tables: It seems to happen on all my tables. I have RLS enabled, and have this kind of policy on the tables I am trying to access: Is this an issue with my database? Do I need to start fresh? I haven't had this problem on other databases before. |
Answered by
GaryAustin1
May 19, 2025
Replies: 1 comment 1 reply
|
Did you run SQL to modify the grants on the public schema? This is not an RLS issue but a grant issue. grant usage on schema public to postgres, anon, authenticated, service_role;
grant all privileges on all tables in schema public to postgres, anon, authenticated, service_role;
grant all privileges on all functions in schema public to postgres, anon, authenticated, service_role;
grant all privileges on all sequences in schema public to postgres, anon, authenticated, service_role;
alter default privileges in schema public grant all on tables to postgres, anon, authenticated, service_role;
alter default privileges in schema public grant all on functions to postgres, anon, authenticated, service_role;
alter default privileges in schema public grant all on sequences to postgres, anon, authenticated, service_role;Might restore them. |
1 reply
Answer selected by
oliverpaddock
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment

Did you run SQL to modify the grants on the public schema?
Do you use something like Prisma that would do so?
This is not an RLS issue but a grant issue.