Rowpass 42501: permission denied for table Not affiliated with Supabase

Rowpass / Guides

Postgres ACL decoder

Paste the privilege string. Get one row per role, in words.

RolePrivilegesData APIGranted by
postgresINSERT, SELECT, UPDATE, DELETE, TRUNCATE, REFERENCES, TRIGGER, MAINTAINSELECT, INSERT, UPDATE, DELETEpostgres
anonTRUNCATE, REFERENCES, TRIGGER, MAINTAINnone: requests as this role get 42501postgres
authenticatedINSERT, SELECT, UPDATE, DELETE, TRUNCATE, REFERENCES, TRIGGER, MAINTAINSELECT, INSERT, UPDATE, DELETEpostgres
service_roleINSERT, SELECT, UPDATE, DELETE, TRUNCATE, REFERENCES, TRIGGER, MAINTAINSELECT, INSERT, UPDATE, DELETEpostgres

The sample is a table created after Supabase's change: anon holds only the four privileges the Data API does not use, so requests as anon get 42501.

How to read one entry

Each entry has the form grantee=letters/grantor. An empty name before the equals sign means PUBLIC, which is every role. A star after a letter means that privilege was given with grant option. The PostgreSQL manual's own example: calvin=r*w/hobbes gives calvin SELECT with grant option and UPDATE, both granted by hobbes.

Every letter

LetterPrivilegeApplies to
rSELECTTable, column, sequence, large object
aINSERTTable, column
wUPDATETable, column, sequence, large object
dDELETETable
DTRUNCATETable
xREFERENCESTable, column
tTRIGGERTable
mMAINTAINTable
CCREATEDatabase, schema, tablespace
cCONNECTDatabase
TTEMPORARYDatabase
XEXECUTEFunction, procedure
UUSAGESchema, sequence, type, domain, language, foreign data wrapper, foreign server
sSETParameter
AALTER SYSTEMParameter

Where to get the string

select relname, relacl
from pg_class
where relnamespace = 'public'::regnamespace
  and relkind in ('r', 'p', 'v');

An empty relacl means nobody has run a grant or revoke on the object yet: the owner has everything and other roles have nothing on a table.

Three strings you will meet on Supabase

ACL entryReads asThrough the Data API
anon=arwdDxtm/postgresEvery table privilege (the old automatic default on Postgres 17).Reachable. Row level security is the only filter.
anon=Dxtm/postgresTRUNCATE, REFERENCES, TRIGGER, MAINTAIN. No SELECT, INSERT, UPDATE or DELETE.42501 for every request. This is a new table after the change.
anon=r/postgresSELECT only.Reads work. Writes get 42501.

Supabase documents the middle case: New tables keep truncate, references, trigger, and maintain, and new sequences keep update. We ran the same revoke in our test and decoded the result with this page's decoder.

Write the fix for your tables

One table is free. The whole schema with a rollback file is $9 one-time.

 

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.

    Questions

    What does arwdDxt stand for?

    INSERT (a, "append"), SELECT (r, "read"), UPDATE (w, "write"), DELETE (d), TRUNCATE (D), REFERENCES (x) and TRIGGER (t). Postgres 17 adds m for MAINTAIN, so a full table entry there reads arwdDxtm.

    Why is the role name empty in "=r/postgres"?

    An empty grantee is PUBLIC, the pseudo-role that stands for every role in the database.

    Does this page send my ACL anywhere?

    No. The string is decoded by the script in this page. The site records only that the decoder was used and how many entries it found.

    Sources

    Related

    Did it fix your error?