Pq: permission denied for schema public

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?

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;