ksavani is setting up Discourse on Ubuntu for development and encounters issues with Redis and PostgreSQL. Initially, Redis wasn’t running, which Falco helps resolve by confirming the service is active. Next, ksavani faces “invalid access” during db:migrate, suspecting a privilege issue. Falco checks if the PostgreSQL user was correctly created per the guide, noting ksavani used a custom command that may not match the Linux username. ksavani confirms the Linux and PostgreSQL usernames are identical (krishna.savani). Falco suggests manually granting SUPERUSER privileges to the PostgreSQL user via ALTER USER, then testing access with psql -d discourse_development. Despite this, ksavani still gets Discourse::InvalidAccess, indicating the issue persists despite correct permissions, possibly pointing to a deeper configuration or Rails/Discourse-level problem.
I did sorted out the problem as you said we need to start the redis service so i did start and it was working good then i did add next all command as per documentation but on db:migrate command i got the issue as invalid access. Please see the screenshot. and i have attached another screenshot also please check and let me know if any privilege issue.
Yes i did, I use the command sudo -u postgres createuser -s "krishna.savani" and you can check my second screenshot also. I did try my many ways but still saying invalid access.
But that not exactly the command the guide tells you to run, is it?
You need to create a PostgreSQL superuser with the same name as the Linux user that will run the migrations. You even went out of your way to blur the username of the linux user in the screenshots you shared, so I can only assume that you are running under a different user.