On Fri, Apr 21, 2017 at 10:40 PM, Josh Berkus <[email protected]> wrote:
> 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? This is covered in the docs: https://www.pgadmin.org/docs4/1.x/server_deployment.html Create a directory, setup the config to use it as required, then chown the database after running setup (which is probably easier than trying to run it as the apache user directly). -- Dave Page Blog: http://pgsnake.blogspot.com Twitter: @pgsnake EnterpriseDB UK: http://www.enterprisedb.com The Enterprise PostgreSQL Company
