Обсуждение: pgAdmin error
I am trying to use pgAdmin 1.8.4 to edit the pg_hba.conf file on a
PostgreSQL 8.3 database running on Ubuntu 8.10. I get the following
error message:
An error has occurred:
ERROR: absolute path not allowed
CONTEXT: SQL function "pg_file_length" statement 1
then...
Backend Access Configuration Editor -
/etc/postresql/8.3/main/pg_hba.conf on Kepler...
with a blank screen.
My configuration seems ok. Any help?
from the pgadmin.log
2008-11-22 01:20:21 INFO : Server name: kepler.fdu.edu (resolved to:
132.238.16.3)
2008-11-22 01:20:21 INFO : Opening connection with connection string:
host='kepler.fdu.edu' hostaddr=132.238.16.3 dbname='postgres'
user='david' password='XXXXXX' port=5432 sslmode=require
2008-11-22 01:20:24 QUERY : Set query (kepler.fdu.edu:5432): SET
DateStyle=ISO;SELECT oid, pg_encoding_to_char(encoding) AS encoding,
datlastsysoid
FROM pg_database WHERE oid = 11511
2008-11-22 01:20:24 INFO : Setting client_encoding to 'UNICODE'
2008-11-22 01:20:24 QUERY : Set query (kepler.fdu.edu:5432): SELECT
proname, pronargs, proargtypes[0] AS arg0, proargtypes[1] AS arg1,
proargtypes[2] AS arg2
FROM pg_proc
JOIN pg_namespace n ON n.oid=pronamespace
WHERE proname IN ('pg_tablespace_size', 'pg_file_read',
'pg_logfile_rotate', 'pg_postmaster_starttime', 'pg_terminate_backend',
'pg_reload_conf', 'pgstattuple', 'pgstatindex')
AND nspname IN ('pg_catalog', 'public')
2008-11-22 01:20:24 QUERY : Scalar query (kepler.fdu.edu:5432): SHOW
hba_file
2008-11-22 01:20:24 QUERY : Query result:
/etc/postgresql/8.3/main/pg_hba.conf
2008-11-22 01:20:24 QUERY : Scalar query (kepler.fdu.edu:5432): SELECT
pg_file_read('/etc/postgresql/8.3/main/pg_hba.conf', 0,
pg_file_length('/etc/postgresql/8.3/main/pg_hba.conf'))
2008-11-22 01:20:24 ERROR : ERROR: absolute path not allowed
CONTEXT: SQL function "pg_file_length" statement 1
On Sat, Nov 22, 2008 at 6:35 AM, David <lists@theflorys.org> wrote: > I am trying to use pgAdmin 1.8.4 to edit the pg_hba.conf file on a > PostgreSQL 8.3 database running on Ubuntu 8.10. I get the following > error message: > > An error has occurred: > > ERROR: absolute path not allowed > CONTEXT: SQL function "pg_file_length" statement 1 > > then... > > Backend Access Configuration Editor - > /etc/postresql/8.3/main/pg_hba.conf on Kepler... > > with a blank screen. Hmm - PostgreSQL won't allow us to access files outside of the data directory. iirc, it does that by insisting that all paths are relative, and don't contain .. I assume your data is not in /etc/postgresql/8.3/main - just your config? -- Dave Page EnterpriseDB UK: http://www.enterprisedb.com
Dave Page wrote: > On Sat, Nov 22, 2008 at 6:35 AM, David <lists@theflorys.org> wrote: >> I am trying to use pgAdmin 1.8.4 to edit the pg_hba.conf file on a >> PostgreSQL 8.3 database running on Ubuntu 8.10. I get the following >> error message: >> >> An error has occurred: >> >> ERROR: absolute path not allowed >> CONTEXT: SQL function "pg_file_length" statement 1 >> >> then... >> >> Backend Access Configuration Editor - >> /etc/postresql/8.3/main/pg_hba.conf on Kepler... >> >> with a blank screen. > > Hmm - PostgreSQL won't allow us to access files outside of the data > directory. iirc, it does that by insisting that all paths are > relative, and don't contain .. > > I assume your data is not in /etc/postgresql/8.3/main - just your config? That's the default location on debian. IIRC it also means that the database server doesn't have write permissions on the files anyway, so even if it allowed the opening of them it would not be possible to make modifications from pgAdmin anyway. Bottom line - you can't edit your postgresql configuration remotely on Debian. //Magnus