Please help to setup pgAdmin 4, I have an error "You don't have permission to access this resource."

I followed all instructions step by step:

And after all, I have an error “You don’t have permission to access this resource.”.

I can successfully create any host and all works fine but I can’t understand why I don’t have permissions for pgAdmin4. There may be something missing in the instructions… Please help me with this issue.

Submit an answer

This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Sign In or Sign Up to Answer

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Did you solve the problem? I have the same one…

Hi @aikor,

Can you check in your Apache Error Log, it should state the reason behind the 403 error code?

You should be able to find where your error_log is located from the vhost configuration of pgadmin4 sudo nano /etc/apache2/sites-available/pgadmin4.conf

Hi @aikor,

I went over the tutorial and can I ask you what ownership did you use, was it www-data or something else? These ownerships are used for your files and directories you need to create:

sudo mkdir -p /var/lib/pgadmin4/sessions
sudo mkdir /var/lib/pgadmin4/storage
sudo mkdir /var/log/pgadmin4
sudo chown -R sammy:sammy /var/lib/pgadmin4
sudo chown -R sammy:sammy /var/log/pgadmin4

Regards, KFSys