Re: Install of pgadmin4 from package fails ...

From: Josh Berkus <josh(at)berkus(dot)org>
To: Devrim Gündüz <devrim(at)gunduz(dot)org>
Cc: pgadmin-hackers <pgadmin-hackers(at)postgresql(dot)org>
Subject: Re: Install of pgadmin4 from package fails ...
Date: 2017-04-21 21:40:44
Message-ID: 31f14480-46d0-03d8-8f13-b1ff6294f326@berkus.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgadmin-hackers

On 04/21/2017 02:14 PM, Josh Berkus wrote:
> On 04/21/2017 01:57 AM, Devrim Gündüz wrote:
>> On RHEL 7 / Fedora 25:
>>
>> * systemctl enable pgadmin4-v1.service; systemctl start pgadmin4-v1.service
>> * cp /etc/httpd/conf.d/pgadmin4-v1.conf.sample /etc/httpd/conf.d/pgadmin4-
>> v1.conf
>> * systemctl start httpd.service
>>
>> should be enough, at least this is what I just tested on my Fedora 25 box.
>
> So I just tried this, and it doesn't do any of the setup.
>
> There's no config_local, and as far as I can tell the database isn't
> created. It's hard to know for sure, though, because without a
> config_local I'm not sure where it would be located.
>
> Error: [Fri Apr 21 21:02:32.080337 2017] [wsgi:error] [pid 26] [remote
> 76.115.138.49:35628] FileNotFoundError: [Errno 2] No such file or
> directory: '/usr/share/httpd/.pgadmin/pgadmin4.log'
>
> ... certainly there is no /usr/share/httpd/.pgadmin directory
>

Aha, here's the problem. Setup is getting run as root, not as the user
httpd. This means it's dropping .pgadmin into /root/, which the web
server can't access; it's "home" directory is /usr/share/httpd.
However, that directory isn't writable by the apache user, either.

There isn't an easy fix for this; on a default Fedora or CentOS system,
the only directory the apache user has read/write to is /tmp, as far as
I know.

Ideas?

--
Josh Berkus
Containers & Databases Oh My!

In response to

Responses

Browse pgadmin-hackers by date

  From Date Subject
Next Message Josh Berkus 2017-04-21 22:41:12 QT dependances of the web version?
Previous Message Joao Pedro De Almeida Pereira 2017-04-21 19:42:33 [patch] Dependents and Dependencies in GreenPlum