Code Monkey home page Code Monkey logo

Comments (2)

aeneasr avatar aeneasr commented on June 14, 2024

From your logs Postgres says: permission denied for schema public

from kratos.

pdarcos avatar pdarcos commented on June 14, 2024

Thanks @aeneasr

I saw that too but it makes no sense since the kratos user already has full privileges on the database kratos as well as schema public:

postgres@auth:~$ psql
psql (15.6 (Debian 15.6-0+deb12u1))
Type "help" for help.

postgres=# GRANT ALL ON SCHEMA public TO kratos;
GRANT

and

postgres@auth:~$ psql
psql (15.6 (Debian 15.6-0+deb12u1))
Type "help" for help.

postgres=# GRANT ALL ON ALL TABLES IN SCHEMA public TO kratos ;
GRANT

yet I still get the same error message...

DEBU[2024-03-26T15:21:12Z] 0.0033 seconds audience=application service_name=Ory Kratos service_version=v1.1.0
Error: migrator: problem creating schema migrations: unable to execute statement: CREATE TABLE schema_migration (version VARCHAR (48) NOT NULL, version_self INT NOT NULL DEFAULT 0): ERROR: permission denied for schema public (SQLSTATE 42501)

I believe your documentation is outdated (it still tells us to install node v16 for example) and must be missing something to work with newer versions of postgresql.

Any idea?

Thanks

EDIT: Finally figured out the problem. It seems my suspicions are confirmed. In newer versions of postgresql one must explicitly set the kratos user as the owner of the kratos database or else it won't work regardless if the kratos user already was given full privileges on the database.

ie. the documentation is incomplete. Besides running the command "GRANT CONNECT ON DATABASE kratos to kratos;" from the documentation, one must also run the following command with newer versions of postgresql

postgres=# ALTER DATABASE kratos owner to kratos;
ALTER DATABASE

You might want to update the documentation so that other new users don't spend time figuring this out on their own

from kratos.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.