# How do I fix a "permission denied for schema public" error in PostgreSQL? An `ERROR: permission denied for schema public` error happens when the connected user does not have the appropriate privileges to access the public schema. Users need [`CREATE`](https://www.postgresql.org/docs/current/ddl-priv.html#DDL-PRIV-CREATE) privileges to create new objects in the schema and [`USAGE`](https://www.postgresql.org/docs/current/ddl-priv.html#DDL-PRIV-USAGE) privileges to view objects in the schema. To resolve the permission denied error, you need to update the user’s privileges on the public schema to `CREATE`, `USAGE`, or `ALL` (both `CREATE` and `USAGE`), depending on the level of access you want the user to have. Follow the instructions in [How to Modify User Privileges in PostgreSQL Databases](https://docs.digitalocean.com/products/databases/postgresql/how-to/modify-user-privileges/index.html.md). When you’ve connected to the database, you can grant privileges on the public schema with the following example command, substituting the permission level you want (`ALL` in the example) and the user (`example_user` in this example): ```sql GRANT ALL PRIVILEGES ON SCHEMA public TO example_user; ``` To verify the privilege change, you can query the `information_schema.role_schema_grants` system catalog, which stores details about user privileges on schemas. For example, the following query lists the permissions that `example_user` has on the public schema: ```sql SELECT grantee, privilege_type FROM information_schema.role_schema_grants WHERE schema_name = 'public' AND grantee = 'example_user'; ``` The query outputs a table with `grantee` and `privilege_type` columns: ```sql ... grantee | privilege_type --------------+---------------- example_user | USAGE example_user | CREATE ... ``` This example output shows that `example_user` has both `USAGE` and `CREATE` privileges on the public schema. ## Related Topics [How do I fix the pgvector "could not open extension control file" error?](https://docs.digitalocean.com/support/how-do-i-fix-the-pgvector-could-not-open-extension-control-file-error/index.html.md): Use the command CREATE EXTENSION vector; instead of pgvector. [How do I fix the pg_dumpall "permission denied for table pg_authid" error?](https://docs.digitalocean.com/support/how-do-i-fix-the-pg_dumpall-permission-denied-for-table-pg_authid-error/index.html.md): Add the –no-role-passwords flag to the pg\_dumpall command. [How do I fix the pg_dump "aborting because of server version mismatch" error?](https://docs.digitalocean.com/support/how-do-i-fix-the-pg_dump-aborting-because-of-server-version-mismatch-error/index.html.md): Resolve the pg\_dump server version mismatch by upgrading pg\_dump, matching it to the server version, or using a third-party backup tool.