Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pq: permission denied for schema public #21442

Closed
thepra opened this issue Oct 18, 2022 · 3 comments
Closed

pq: permission denied for schema public #21442

thepra opened this issue Oct 18, 2022 · 3 comments

Comments

@thepra
Copy link

thepra commented Oct 18, 2022

Ubuntu 20.04 LTS HWE

Summary

Starting (through systemd) Mattermost based on PostgreSQL 15(on the same server) stops immediately on this error:

{"timestamp":"2022-10-18 18:40:27.382 +02:00","level":"fatal","msg":"Failed to apply database migrations.","caller":"sqlstore/store.go:166","error":"pq: permission denied for schema public"}

Steps to reproduce

Following the installation guide.
Starting Mattermost like: systemctl start mattermost.service
Immediately ending.

Expected behavior

Installation instruction working

Is there a missing instruction to apply to PostgreSQL? Or what else it can be?

@amyblais
Copy link
Member

@thepra Would you be open to posting about this on our Peer-to-peer Help channel or at https://forum.mattermost.com/? One of our devs or community members will likely be able to help troubleshoot this question.

@thepra
Copy link
Author

thepra commented Oct 20, 2022

Thanks to Alexander this is solved.
for PSQL 15 you need extra grants for the user:

GRANT ALL ON DATABASE mattermost TO mmuser;
ALTER DATABASE mattermost OWNER TO mmuser;
GRANT USAGE, CREATE ON SCHEMA PUBLIC TO mmuser;

@thepra thepra closed this as completed Oct 20, 2022
@anx-ag
Copy link
Contributor

anx-ag commented Oct 20, 2022

Forum link: https://forum.mattermost.com/t/pq-permission-denied-for-schema-public/14273

Will see if I can reproduce that based on the instructions you followed and will update the forum post then.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants