Question

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

Posted October 22, 2020 146 views
ApachePostgreSQL

I followed all instructions step by step: https://www.digitalocean.com/community/tutorials/how-to-install-configure-pgadmin4-server-mode-ru

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.

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.

×
2 answers

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

  • I used www-data.
    I tried to use your option and it didn’t help.

    Maybe there are some differences in pgadmin as I used more newer version: pgadmin4-4.27

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

Submit an Answer