Thread: pgAdmin4 2.0 python wheel on Ubuntu
With 1.6 I was running pgAdmin4.py as a standard user. With 2.0 I get a permission denied on
/var/log/pgadmin/pgadmin4.log. If I run pgAdmin4.py as root it doesn't have access to my .ssh/ and I end up in and endless cycle of failed OpehSSH requests.
In my .ssh/config I have associated a SSL shared key file with a remote database server. Obviously root doesn't have access to my .ssh/ but I don't know why pgAdmin4 needs access to it in the first place. Maybe I've got a connection to that server saved some place?
In 1.6 it looks like the pgAdmin log was saved in ~/.pgadmin/pgadmin4.log. Is there a way in 2.0 to set the log directory?
Thanks
--
Richard W. Greenwood, PLS
www.greenwoodmap.com
www.greenwoodmap.com
You can set customize the location as per your need,
Create a file named config_local.py (if not already present) at your installation location ../pgadmin4/web/
and add below 3 lines in it,
import os
DATA_DIR = os.path.realpath(os.path.expanduser(u'~/.pgadmin/'))
LOG_FILE = os.path.join(DATA_DIR, 'pgadmin4.log')
restart pgAdmin4 and check if that solves your problem.
--
Regards,
On Sat, Oct 7, 2017 at 7:44 PM, Richard Greenwood <richard.greenwood@gmail.com> wrote:
With 1.6 I was running pgAdmin4.py as a standard user. With 2.0 I get a permission denied on/var/log/pgadmin/pgadmin4.log. If I run pgAdmin4.py as root it doesn't have access to my .ssh/ and I end up in and endless cycle of failed OpehSSH requests.In my .ssh/config I have associated a SSL shared key file with a remote database server. Obviously root doesn't have access to my .ssh/ but I don't know why pgAdmin4 needs access to it in the first place. Maybe I've got a connection to that server saved some place?In 1.6 it looks like the pgAdmin log was saved in ~/.pgadmin/pgadmin4.log. Is there a way in 2.0 to set the log directory?Thanks--Richard W. Greenwood, PLS
www.greenwoodmap.com
Murtuza,
Thanks for the reply. I added the lines you suggested to /usr/local/lib/python2.7/dist-packages/pgadmin4/config_local.py and then tried to start pgadmin as me (a standard user) with:python /usr/local/lib/python2.7/dist-packages/pgadmin4/pgAdmin4.py
Traceback (most recent call last):
File "/usr/local/lib/python2.7/dist-packages/pgadmin4/pgAdmin4.py", line 67, in <module>
app = create_app()
File "/usr/local/lib/python2.7/dist-packages/pgadmin4/pgadmin/__init__.py", line 311, in create_app
paths.init_app(app)
File "/usr/local/lib/python2.7/dist-packages/pgadmin4/pgadmin/utils/paths.py", line 75, in init_app
'The user does not have permission to read and write to the specified storage directory.'
Exception: The user does not have permission to read and write to the specified storage directory.
I started pgAdmin4.py as root and config_local.pyc got rebuilt, but same OpenSSH errors, presumably related to root not having access to my .ssh/File "/usr/local/lib/python2.7/dist-packages/pgadmin4/pgAdmin4.py", line 67, in <module>
app = create_app()
File "/usr/local/lib/python2.7/dist-packages/pgadmin4/pgadmin/__init__.py", line 311, in create_app
paths.init_app(app)
File "/usr/local/lib/python2.7/dist-packages/pgadmin4/pgadmin/utils/paths.py", line 75, in init_app
'The user does not have permission to read and write to the specified storage directory.'
Exception: The user does not have permission to read and write to the specified storage directory.
On Sat, Oct 7, 2017 at 11:23 PM, Murtuza Zabuawala <murtuza.zabuawala@enterprisedb.com> wrote:
You can set customize the location as per your need,Create a file named config_local.py (if not already present) at your installation location ../pgadmin4/web/and add below 3 lines in it,import osDATA_DIR = os.path.realpath(os.path.expanduser(u'~/.pgadmin/')) LOG_FILE = os.path.join(DATA_DIR, 'pgadmin4.log')restart pgAdmin4 and check if that solves your problem.--Regards,On Sat, Oct 7, 2017 at 7:44 PM, Richard Greenwood <richard.greenwood@gmail.com> wrote:With 1.6 I was running pgAdmin4.py as a standard user. With 2.0 I get a permission denied on/var/log/pgadmin/pgadmin4.log. If I run pgAdmin4.py as root it doesn't have access to my .ssh/ and I end up in and endless cycle of failed OpehSSH requests.In my .ssh/config I have associated a SSL shared key file with a remote database server. Obviously root doesn't have access to my .ssh/ but I don't know why pgAdmin4 needs access to it in the first place. Maybe I've got a connection to that server saved some place?In 1.6 it looks like the pgAdmin log was saved in ~/.pgadmin/pgadmin4.log. Is there a way in 2.0 to set the log directory?Thanks--Richard W. Greenwood, PLS
www.greenwoodmap.com
--
Richard W. Greenwood, PLS
www.greenwoodmap.com
www.greenwoodmap.com
Hi,
Can you try pasting follwoing in your config_local.py,
import os
DATA_DIR = os.path.realpath(os.path.expan duser(u'~/.pgadmin/'))
LOG_FILE = os.path.join(DATA_DIR, 'pgadmin4.log')
SQLITE_PATH = os.path.join(DATA_DIR, 'pgadmin4.db')
SESSION_DB_PATH = os.path.join(DATA_DIR, 'sessions')
STORAGE_DIR = os.path.join(DATA_DIR, 'storage')
Restart pgAdmin4 and check.
On Mon, Oct 9, 2017 at 6:04 AM, Richard Greenwood <richard.greenwood@gmail.com> wrote:
Thanks.I'm not a Python guy so I may be completely missing the boat here.Then I tried running pgAdmin4.py again as me (hoping that with config_local.pyc having been rebuilt maybe it would work), but got same errors.and get the following errors:Murtuza,Thanks for the reply. I added the lines you suggested to /usr/local/lib/python2.7/dist-packages/pgadmin4/config_ local.py and then tried to start pgadmin as me (a standard user) with: python /usr/local/lib/python2.7/dist-packages/pgadmin4/pgAdmin4.py Traceback (most recent call last):I started pgAdmin4.py as root and config_local.pyc got rebuilt, but same OpenSSH errors, presumably related to root not having access to my .ssh/
File "/usr/local/lib/python2.7/dist-packages/pgadmin4/ pgAdmin4.py", line 67, in <module>
app = create_app()
File "/usr/local/lib/python2.7/dist-packages/pgadmin4/ pgadmin/__init__.py", line 311, in create_app
paths.init_app(app)
File "/usr/local/lib/python2.7/dist-packages/pgadmin4/ pgadmin/utils/paths.py", line 75, in init_app
'The user does not have permission to read and write to the specified storage directory.'
Exception: The user does not have permission to read and write to the specified storage directory.On Sat, Oct 7, 2017 at 11:23 PM, Murtuza Zabuawala <murtuza.zabuawala@enterprisedb.com> wrote: You can set customize the location as per your need,Create a file named config_local.py (if not already present) at your installation location ../pgadmin4/web/and add below 3 lines in it,import osDATA_DIR = os.path.realpath(os.path.expanduser(u'~/.pgadmin/')) LOG_FILE = os.path.join(DATA_DIR, 'pgadmin4.log')restart pgAdmin4 and check if that solves your problem.--Regards,On Sat, Oct 7, 2017 at 7:44 PM, Richard Greenwood <richard.greenwood@gmail.com> wrote:With 1.6 I was running pgAdmin4.py as a standard user. With 2.0 I get a permission denied on/var/log/pgadmin/pgadmin4.log. If I run pgAdmin4.py as root it doesn't have access to my .ssh/ and I end up in and endless cycle of failed OpehSSH requests.In my .ssh/config I have associated a SSL shared key file with a remote database server. Obviously root doesn't have access to my .ssh/ but I don't know why pgAdmin4 needs access to it in the first place. Maybe I've got a connection to that server saved some place?In 1.6 it looks like the pgAdmin log was saved in ~/.pgadmin/pgadmin4.log. Is there a way in 2.0 to set the log directory?Thanks--Richard W. Greenwood, PLS
www.greenwoodmap.com
--Richard W. Greenwood, PLS
www.greenwoodmap.com
Thank you Murtuza. I can now again run pgAdmin4.py as me and connect to remote servers that require SSL.
BEst regards,On Sun, Oct 8, 2017 at 11:08 PM, Murtuza Zabuawala <murtuza.zabuawala@enterprisedb.com> wrote:
Hi,Can you try pasting follwoing in your config_local.py,import osDATA_DIR = os.path.realpath(os.path.expanduser(u'~/.pgadmin/')) LOG_FILE = os.path.join(DATA_DIR, 'pgadmin4.log')SQLITE_PATH = os.path.join(DATA_DIR, 'pgadmin4.db')SESSION_DB_PATH = os.path.join(DATA_DIR, 'sessions')STORAGE_DIR = os.path.join(DATA_DIR, 'storage')Restart pgAdmin4 and check.On Mon, Oct 9, 2017 at 6:04 AM, Richard Greenwood <richard.greenwood@gmail.com> wrote:Thanks.I'm not a Python guy so I may be completely missing the boat here.Then I tried running pgAdmin4.py again as me (hoping that with config_local.pyc having been rebuilt maybe it would work), but got same errors.and get the following errors:Murtuza,Thanks for the reply. I added the lines you suggested to /usr/local/lib/python2.7/dist-packages/pgadmin4/config_local .py and then tried to start pgadmin as me (a standard user) with: python /usr/local/lib/python2.7/dist-packages/pgadmin4/pgAdmin4.py Traceback (most recent call last):I started pgAdmin4.py as root and config_local.pyc got rebuilt, but same OpenSSH errors, presumably related to root not having access to my .ssh/
File "/usr/local/lib/python2.7/dist-packages/pgadmin4/pgAdmin4. py", line 67, in <module>
app = create_app()
File "/usr/local/lib/python2.7/dist-packages/pgadmin4/pgadmin/__ init__.py", line 311, in create_app
paths.init_app(app)
File "/usr/local/lib/python2.7/dist-packages/pgadmin4/pgadmin/ utils/paths.py", line 75, in init_app
'The user does not have permission to read and write to the specified storage directory.'
Exception: The user does not have permission to read and write to the specified storage directory.On Sat, Oct 7, 2017 at 11:23 PM, Murtuza Zabuawala <murtuza.zabuawala@enterprisedb.com> wrote: You can set customize the location as per your need,Create a file named config_local.py (if not already present) at your installation location ../pgadmin4/web/and add below 3 lines in it,import osDATA_DIR = os.path.realpath(os.path.expanduser(u'~/.pgadmin/')) LOG_FILE = os.path.join(DATA_DIR, 'pgadmin4.log')restart pgAdmin4 and check if that solves your problem.--Regards,On Sat, Oct 7, 2017 at 7:44 PM, Richard Greenwood <richard.greenwood@gmail.com> wrote:With 1.6 I was running pgAdmin4.py as a standard user. With 2.0 I get a permission denied on/var/log/pgadmin/pgadmin4.log. If I run pgAdmin4.py as root it doesn't have access to my .ssh/ and I end up in and endless cycle of failed OpehSSH requests.In my .ssh/config I have associated a SSL shared key file with a remote database server. Obviously root doesn't have access to my .ssh/ but I don't know why pgAdmin4 needs access to it in the first place. Maybe I've got a connection to that server saved some place?In 1.6 it looks like the pgAdmin log was saved in ~/.pgadmin/pgadmin4.log. Is there a way in 2.0 to set the log directory?Thanks--Richard W. Greenwood, PLS
www.greenwoodmap.com
--Richard W. Greenwood, PLS
www.greenwoodmap.com
--
Richard W. Greenwood, PLS
www.greenwoodmap.com
www.greenwoodmap.com