Thread: PGACCESS connection failure?

PGACCESS connection failure?

From
Preston Lord
Date:
Hi List!

I love the look of the pgaccess gui BUT
upon trying to connect to my postgres server I get
the error:

Error trying to connect to database 'dbname' on host localhost

PostgreSQL error message. Connection to database failed. 
could not connect to server: Connection refused
Is the server running on host localhost and accepting TCP/IP connections
on prt 5432?


I am also running unix odbc and DataManager for unixodbc without any
trouble. I run SuSE Linux 8 Pro ... any help is appreciated.




-- 

Regards

Preston Lord
Programmer/Developer
Network Specialist
_______________
General Manager
Double T Computer Services
Sask, Canada
1.306.773.2054
http://www.t2.net



Re: PGACCESS connection failure?

From
"C. Maj"
Date:
Preston--

I get this error when the database isn't running.  There is a FAQ
available at www.pgaccess.org that may help point you in the right
direction.  It is also kind of the 'new home' for pgaccess with mailing
lists, CVS, etc.

--Chris

On 29 Jul 2002, Preston Lord waxed:

> Hi List!
>
> I love the look of the pgaccess gui BUT
> upon trying to connect to my postgres server I get
> the error:
>
> Error trying to connect to database 'dbname' on host localhost
>
> PostgreSQL error message. Connection to database failed.
> could not connect to server: Connection refused
> Is the server running on host localhost and accepting TCP/IP connections
> on prt 5432?
>
>
> I am also running unix odbc and DataManager for unixodbc without any
> trouble. I run SuSE Linux 8 Pro ... any help is appreciated.
>

-- 

cmaj_at_freedomcorpse_dot_info
0xC0051F6A
5EB8 2035 F07B 3B09 5A31  7C09 196F 4126 C005 1F6A





Re: PGACCESS connection failure?

From
"William West"
Date:
Ran into similar symptoms, found that most utilities
(psql, for example) on the localhost use the Unix
Domain and work fine, but pgaccess uses TCP/IP.

My pg_hba.conf had a host statement to allow
TCP/IP, but postmaster did not have '-i' to enable
TCP/IP. I needed both to use pgaccess.



                                       Preston Lord
                                                           <webmaster           To:     pgsql-interfaces@postgresql.org
                                                                               @t2.net>             cc:
                                                                                                   Sent by:
Subject:    [INTERFACES] PGACCESS connection failure?
pgsql-interfa
                   ces-owner


                                                                               07/29/2002
                                                                                                   01:05 PM



                   
 




Hi List!

I love the look of the pgaccess gui BUT
upon trying to connect to my postgres server I get
the error:

Error trying to connect to database 'dbname' on host localhost

PostgreSQL error message. Connection to database failed.
could not connect to server: Connection refused
Is the server running on host localhost and accepting TCP/IP connections
on prt 5432?


I am also running unix odbc and DataManager for unixodbc without any
trouble. I run SuSE Linux 8 Pro ... any help is appreciated.




--

Regards

Preston Lord
Programmer/Developer
Network Specialist
_______________
General Manager
Double T Computer Services
Sask, Canada
1.306.773.2054
http://www.t2.net


---------------------------(end of broadcast)---------------------------
TIP 6: Have you searched our list archives?

http://archives.postgresql.org





Re: PGACCESS connection failure?

From
"Iavor Raytchev"
Date:
Hm... What would that mean? You can't use the -i or you do not want to
use it for some reason?

> -----Original Message-----
> From: pgsql-interfaces-owner@postgresql.org
> [mailto:pgsql-interfaces-owner@postgresql.org]On Behalf Of
> William West
> Sent: Dienstag, 30. Juli 2002 00:39
> To: Preston Lord
> Cc: pgsql-interfaces@postgresql.org
> Subject: Re: [INTERFACES] PGACCESS connection failure?
>
> Ran into similar symptoms, found that most utilities
> (psql, for example) on the localhost use the Unix
> Domain and work fine, but pgaccess uses TCP/IP.
>
> My pg_hba.conf had a host statement to allow
> TCP/IP, but postmaster did not have '-i' to enable
> TCP/IP. I needed both to use pgaccess.



Re: PGACCESS connection failure?

From
Preston Lord
Date:
ok, all the help is appreciated, but how do I get
posmaster to run with -i by default or is there a way?

webmin simply sends a 

/etc/init.d/postgresql start

to start postgres. I can do it manually, just want to know if there
is a solution to force postmaster to use -i always.

I checked the pg_hba.conf for help, but all I found was

# If you want to allow non-local connections, you will need to add more
# "host" records. Also, remember IP connections are only enabled if you
# start the postmaster with the -i option.

how?



Re: PGACCESS connection failure?

From
"William West"
Date:
'-i' works fine for me. I did not use it at first because I did not know
that pgaccess needed it.

Was only trying to be helpful to Preston. I have no particular reason
to be disturbed by pgaccess needing TCP/IP ... I just figured that
my TCL/TK did not have any Unix Domain support, and find it
acceptable to enable TCP/IP when needing the services of
pgaccess.

It sounded like Preston's "BUT ..." could be the same thing I
ran into, needing to configure with '-i' when I did not expect to
need to do that, so I posted what I posted.

But since you asked ... IS there a way to configure pgaccess
to use Unix Domain sockets?.




                                       "Iavor
                                                           Raytchev"            To:     William West/CIV/CSC@CSC
                                                                               <iavor.raytch        cc:
<pgsql-interfaces@postgresql.org>,"Preston Lord" <webmaster@t2.net>, "pgaccess -                               ev
           developers" <developers@pgaccess.org>
          @verysmall.or        Subject:     Re: [INTERFACES] PGACCESS connection failure?
                              g>
                                                  Sent by:
                                                                      pgsql-interfa
                                                                                          ces-owner



                             07/29/2002
                                                 06:50 PM


                                                                                          
 




Hm... What would that mean? You can't use the -i or you do not want to
use it for some reason?

> -----Original Message-----
> From: pgsql-interfaces-owner@postgresql.org
> [mailto:pgsql-interfaces-owner@postgresql.org]On Behalf Of
> William West
> Sent: Dienstag, 30. Juli 2002 00:39
> To: Preston Lord
> Cc: pgsql-interfaces@postgresql.org
> Subject: Re: [INTERFACES] PGACCESS connection failure?
>
> Ran into similar symptoms, found that most utilities
> (psql, for example) on the localhost use the Unix
> Domain and work fine, but pgaccess uses TCP/IP.
>
> My pg_hba.conf had a host statement to allow
> TCP/IP, but postmaster did not have '-i' to enable
> TCP/IP. I needed both to use pgaccess.


---------------------------(end of broadcast)---------------------------
TIP 3: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to majordomo@postgresql.org so that your
message can get through to the mailing list cleanly





Re: PGACCESS connection failure?

From
Preston Lord
Date:
cool, that will work!

Now, another Question..,. I have got pgaccess to run
but everytime I try to click "Design" on one of my tables I get an error
that says:

Note:   (oid exists, I can see it fine in all other gui's etc) ideas?

ERROR:  Attribute 'oid' not found

ERROR:  Attribute 'oid' not found
   while executing
"pg_select pgsql4 {select oid,indexrelid from pg_index where
(pg_class.relname='ebads') and (pg_class.oid=pg_index.indrelid)} rec {    lappend PgAcVar(t..."   ("uplevel" body line
1)  invoked from within
 
"uplevel pg_select $args"   (procedure "wpg_select" line 3)   invoked from within
"wpg_select $CurrentDB "select oid,indexrelid from pg_index where
(pg_class.relname='$PgAcVar(tblinfo,tablename)') and
(pg_class.oid=pg_index.indrelid)..."   (procedure "refreshTableInformation" line 48)   invoked from within
"refreshTableInformation"   (procedure "Tables::design" line 5)   invoked from within
"Tables::design $objname"   ("Tables" arm line 2)   invoked from within
"switch $PgAcVar(activetab) {Tables  {    Tables::design $objname}Schema  {    Schema::open $objname}Queries {
Queries::design$objname}V..."   (procedure "Mainlib::cmd_Design" line 7)   invoked from within
 
"Mainlib::cmd_Design"   invoked from within
".pgaw:Main.btndesign invoke"   ("uplevel" body line 1)   invoked from within
"uplevel #0 [list $w invoke]"   (procedure "tkButtonUp" line 7)   invoked from within
"tkButtonUp .pgaw:Main.btndesign
"   (command bound to event)

On Mon, 2002-07-29 at 17:12, William West wrote:
> 
> Easiest way to make '-i' automatic is to put it into
> $PGDATA/postmaster.opts.default.
> 
> That file does not automatically exist ... but if you create it,
> postmaster will use it every time it starts.
> 
> You can also put it on postmaster's command line,
> or pass it in from pg_ctl's command line, depending
> on how you start the server.
> 
-- 

Regards

Preston Lord
Programmer/Developer
Network Specialist
_______________
General Manager
Double T Computer Services
Sask, Canada
1.306.773.2054
http://www.t2.net



Re: PGACCESS connection failure?

From
"Iavor Raytchev"
Date:
Hello William,

I did not want to be impolite or something :) I am just hunting all
issues that prevent people form using pgaccess as what I notice is that
many people do not send bugs or requests simply because first of all
they can not make it run.

In this line it was important to know if you have anything against
running PostgreSQL with '-i'. Thank you very much for your reply - it
was very helpful and a good feedback.

I hope the Unix Domain sockets question will be answered soon.

All best,

Iavor

> -----Original Message-----
> From: William West [mailto:wwest@csc.com]
> Sent: Dienstag, 30. Juli 2002 01:06
> To: Iavor Raytchev
> Cc: pgsql-interfaces@postgresql.org; Preston Lord; pgaccess -
> developers
> Subject: Re: [INTERFACES] PGACCESS connection failure?
>
> '-i' works fine for me. I did not use it at first because I
> did not know
> that pgaccess needed it.
>
> Was only trying to be helpful to Preston. I have no particular reason
> to be disturbed by pgaccess needing TCP/IP ... I just figured that
> my TCL/TK did not have any Unix Domain support, and find it
> acceptable to enable TCP/IP when needing the services of
> pgaccess.
>
> It sounded like Preston's "BUT ..." could be the same thing I
> ran into, needing to configure with '-i' when I did not expect to
> need to do that, so I posted what I posted.
>
> But since you asked ... IS there a way to configure pgaccess
> to use Unix Domain sockets?.



Re: PGACCESS connection failure?

From
"Iavor Raytchev"
Date:
Wasn't that thing with the OID fixed?

Preston,

Which pgaccess version do you run? If it is 0.98.7 - you can get 0.98.8
(release 1) form www.pgaccess.org - there the OID error should have been
fixed. This is a development, but very stable version. pgaccess 0.98.8
is planned to be released together with PostgreSQL 7.3

Which PostreSQL version do you use?

Iavor

> -----Original Message-----
> From: pgsql-interfaces-owner@postgresql.org
> [mailto:pgsql-interfaces-owner@postgresql.org]On Behalf Of
> Preston Lord
> Sent: Dienstag, 30. Juli 2002 01:27
> To: pgsql-interfaces@postgresql.org
> Subject: Re: [INTERFACES] PGACCESS connection failure?
>
>
> cool, that will work!
>
> Now, another Question..,. I have got pgaccess to run
> but everytime I try to click "Design" on one of my tables I
> get an error
> that says:
>
> Note:   (oid exists, I can see it fine in all other gui's etc) ideas?
>
> ERROR:  Attribute 'oid' not found
>
> ERROR:  Attribute 'oid' not found
>
>     while executing
> "pg_select pgsql4 {select oid,indexrelid from pg_index where
> (pg_class.relname='ebads') and (pg_class.oid=pg_index.indrelid)} rec {
>         lappend PgAcVar(t..."
>     ("uplevel" body line 1)
>     invoked from within
> "uplevel pg_select $args"
>     (procedure "wpg_select" line 3)
>     invoked from within
> "wpg_select $CurrentDB "select oid,indexrelid from pg_index where
> (pg_class.relname='$PgAcVar(tblinfo,tablename)') and
> (pg_class.oid=pg_index.indrelid)..."
>     (procedure "refreshTableInformation" line 48)
>     invoked from within
> "refreshTableInformation"
>     (procedure "Tables::design" line 5)
>     invoked from within
> "Tables::design $objname"
>     ("Tables" arm line 2)
>     invoked from within
> "switch $PgAcVar(activetab) {
>     Tables  {
>         Tables::design $objname
>     }
>     Schema  {
>         Schema::open $objname
>     }
>     Queries {
>         Queries::design $objname
>     }
>     V..."
>     (procedure "Mainlib::cmd_Design" line 7)
>     invoked from within
> "Mainlib::cmd_Design"
>     invoked from within
> ".pgaw:Main.btndesign invoke"
>     ("uplevel" body line 1)
>     invoked from within
> "uplevel #0 [list $w invoke]"
>     (procedure "tkButtonUp" line 7)
>     invoked from within
> "tkButtonUp .pgaw:Main.btndesign
> "
>     (command bound to event)
>
>
> On Mon, 2002-07-29 at 17:12, William West wrote:
> >
> > Easiest way to make '-i' automatic is to put it into
> > $PGDATA/postmaster.opts.default.
> >
> > That file does not automatically exist ... but if you create it,
> > postmaster will use it every time it starts.
> >
> > You can also put it on postmaster's command line,
> > or pass it in from pg_ctl's command line, depending
> > on how you start the server.



Re: PGACCESS connection failure?

From
"C. Maj"
Date:
If you just want to connect over domain sockets, leave the "Host"
entry box blank in the "Open" database dialog.  I wouldn't have tried
until Iavor put the question the way he did.  Thanks!

--Chris

On Tue, 30 Jul 2002, Iavor Raytchev waxed:

> Hello William,
>
> I did not want to be impolite or something :) I am just hunting all
> issues that prevent people form using pgaccess as what I notice is that
> many people do not send bugs or requests simply because first of all
> they can not make it run.
>
> In this line it was important to know if you have anything against
> running PostgreSQL with '-i'. Thank you very much for your reply - it
> was very helpful and a good feedback.
>
> I hope the Unix Domain sockets question will be answered soon.
>
> All best,
>
> Iavor
>
> > -----Original Message-----
> > From: William West [mailto:wwest@csc.com]
> > Sent: Dienstag, 30. Juli 2002 01:06
> > To: Iavor Raytchev
> > Cc: pgsql-interfaces@postgresql.org; Preston Lord; pgaccess -
> > developers
> > Subject: Re: [INTERFACES] PGACCESS connection failure?
> >
> > '-i' works fine for me. I did not use it at first because I
> > did not know
> > that pgaccess needed it.
> >
> > Was only trying to be helpful to Preston. I have no particular reason
> > to be disturbed by pgaccess needing TCP/IP ... I just figured that
> > my TCL/TK did not have any Unix Domain support, and find it
> > acceptable to enable TCP/IP when needing the services of
> > pgaccess.
> >
> > It sounded like Preston's "BUT ..." could be the same thing I
> > ran into, needing to configure with '-i' when I did not expect to
> > need to do that, so I posted what I posted.
> >
> > But since you asked ... IS there a way to configure pgaccess
> > to use Unix Domain sockets?.
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 4: Don't 'kill -9' the postmaster
>

-- 

cmaj_at_freedomcorpse_dot_info
0xC0051F6A
5EB8 2035 F07B 3B09 5A31  7C09 196F 4126 C005 1F6A




PGACCESS Error Relative Path @ export table

From
"John L. Turner"
Date:
Hi:

Newbe trying to learn pgaccess' import / export of tables

ERROR
"Relative Path not allowed for servers side copy command"

Version downloaded today (Tuesday 30 July 02) was 0.98.8
( even though the/pgaccess/lib/mainlib.tcl says 0.98.7 )

I opened a test database, created with the command
psql mytestdb <  /pgaccess/demo/formdemo.sql

Open Data base with no local host given,
AND with my local host IP #

I did start postmaster with -i

Then From Main pgaccess Menu: Database | Export Table
Tried to export the table phonebook, received above ERROR

I entered the path /home/jlt/phonebook.txt
ERROR received.

Also tested ~/phonebook.txt
Also tested 192.168.110.42:~/phonebook.txt
__________________________________________

Thanks for ANY pointers

John Turner
http://home.ntelos.net/~JLT
"Just because you do not know the answer
does not mean that someone else does"
Stephen J. Gould, {rip}


Re: PGACCESS Error Relative Path @ export table

From
"Andreas Kretzer"
Date:
On 30.07.2002 at 17:45 John L. Turner wrote:

>Hi:
>
>Newbe trying to learn pgaccess' import / export of tables
>
>ERROR
>"Relative Path not allowed for servers side copy command"
>
>Version downloaded today (Tuesday 30 July 02) was 0.98.8 
>( even though the/pgaccess/lib/mainlib.tcl says 0.98.7 )
>
>I opened a test database, created with the command
>psql mytestdb <  /pgaccess/demo/formdemo.sql
>
>Open Data base with no local host given,
>AND with my local host IP #
>
>I did start postmaster with -i
>
>Then From Main pgaccess Menu: Database | Export Table
>Tried to export the table phonebook, received above ERROR
>
>I entered the path /home/jlt/phonebook.txt
>ERROR received.
Are you sure that the error was the same? It might have been
'access denied'. Try /tmp/phonebook.txt

>
>Also tested ~/phonebook.txt
>Also tested 192.168.110.42:~/phonebook.txt

Hmm... It should have been possible (except it is explicitly
catched by pgaccess. But of course the home directory
would have been that of the postgres backend processes'
user.

Hope this helps
Andreas



Re: PGACCESS Error Relative Path @ export table

From
"Nigel J. Andrews"
Date:
On Tue, 30 Jul 2002, John L. Turner wrote:

> Hi:
> 
> Newbe trying to learn pgaccess' import / export of tables
> 
> ERROR
> "Relative Path not allowed for servers side copy command"
> 
> Version downloaded today (Tuesday 30 July 02) was 0.98.8 
> ( even though the/pgaccess/lib/mainlib.tcl says 0.98.7 )

I was going to say that this throws doubt on a correct installation of the new
version but then I haven't checked that the new version has had mainlib.tcl
unpdated for the new number.

> 
> I opened a test database, created with the command
> psql mytestdb <  /pgaccess/demo/formdemo.sql
> 
> Open Data base with no local host given,
> AND with my local host IP #
> 
> I did start postmaster with -i

Well, you need that -i switch because you've specified the local host IP. If
your leave the host and port fields blank, i.e. zero length fields, then you
won't need the -i

> 
> Then From Main pgaccess Menu: Database | Export Table
> Tried to export the table phonebook, received above ERROR
> 
> I entered the path /home/jlt/phonebook.txt
> ERROR received.
> 
> Also tested ~/phonebook.txt
> Also tested 192.168.110.42:~/phonebook.txt
> __________________________________________

No idea, I haven't looked at this.


-- 
Nigel J. Andrews
Director

---
Logictree Systems Limited
Computer Consultants



Re: PGACCESS Error Relative Path @ export table

From
"John L. Turner"
Date:
Andreas Kretzer, wanted me to know...
> On 30.07.2002 at 17:45 John L. Turner wrote:
> >Hi:
> >
> >Newbe trying to learn pgaccess' import / export of tables
> >
> >ERROR
> >"Relative Path not allowed for servers side copy command"
> >
> >Version downloaded today (Tuesday 30 July 02) was 0.98.8
> >( even though the/pgaccess/lib/mainlib.tcl says 0.98.7 )
> >
> >I opened a test database, created with the command
> >psql mytestdb <  /pgaccess/demo/formdemo.sql
> >
> >Open Data base with no local host given,
> >AND with my local host IP #
> >
> >I did start postmaster with -i
> >
> >Then From Main pgaccess Menu: Database | Export Table
> >Tried to export the table phonebook, received above ERROR
> >
> >I entered the path /home/jlt/phonebook.txt
> >ERROR received.
>
> Are you sure that the error was the same? It might have been
> 'access denied'. Try /tmp/phonebook.txt
>
> >Also tested ~/phonebook.txt
> >Also tested 192.168.110.42:~/phonebook.txt
>
> Hmm... It should have been possible (except it is explicitly
> catched by pgaccess. But of course the home directory
> would have been that of the postgres backend processes'
> user.
>
> Hope this helps
> Andreas
_________________
Seem to have found the answer ( at least ONE answer that worked)

Turns out that the only directory that I have permission to write to is:
/var/lib/pgsql/

I started the postmaster -1  as user  postgres

SO that leads to the bottom line Question:
How does a user in postgresql obtain permissions to other directories ?

Thanks to anyone for a kick in pants to find the answer.

P.S. Why didn't the original message just say permissions not set for X user ?

Regards to all that answered before,

John Turner

"Just because you do not know the answer
does not mean that someone else does"
Stephen J. Gould, {rip}


Re: PGACCESS Error Relative Path @ export table

From
Brett Schwarz
Date:
On Wed, 2002-07-31 at 05:55, John L. Turner wrote:
> Andreas Kretzer, wanted me to know...
> > On 30.07.2002 at 17:45 John L. Turner wrote:
> > >Hi:
> > >
> > >Newbe trying to learn pgaccess' import / export of tables
> > >
> > >ERROR
> > >"Relative Path not allowed for servers side copy command"
> > >
> > >Version downloaded today (Tuesday 30 July 02) was 0.98.8
> > >( even though the/pgaccess/lib/mainlib.tcl says 0.98.7 )
> > >
> > >I opened a test database, created with the command
> > >psql mytestdb <  /pgaccess/demo/formdemo.sql
> > >
> > >Open Data base with no local host given,
> > >AND with my local host IP #
> > >
> > >I did start postmaster with -i
> > >
> > >Then From Main pgaccess Menu: Database | Export Table
> > >Tried to export the table phonebook, received above ERROR
> > >
> > >I entered the path /home/jlt/phonebook.txt
> > >ERROR received.
> >
> > Are you sure that the error was the same? It might have been
> > 'access denied'. Try /tmp/phonebook.txt
> >
> > >Also tested ~/phonebook.txt
> > >Also tested 192.168.110.42:~/phonebook.txt
> >
> > Hmm... It should have been possible (except it is explicitly
> > catched by pgaccess. But of course the home directory
> > would have been that of the postgres backend processes'
> > user.
> >
> > Hope this helps
> > Andreas
> _________________
> Seem to have found the answer ( at least ONE answer that worked)
> 
> Turns out that the only directory that I have permission to write to is:
> /var/lib/pgsql/
> 
> I started the postmaster -1  as user  postgres
> 
> SO that leads to the bottom line Question:
> How does a user in postgresql obtain permissions to other directories ?
> 

This is at the OS level. Pgaccess is really only accessing the file via
the filesystem of the OS that you are running. You need to make sure
that the user you start PGAccess with has permissions for those
files/directories. For example, on Unix machines, you would use chmod.
If you are on a machine that is maintained by someone else, then you
would need to ask that person to set the permissions correctly for you.
> Thanks to anyone for a kick in pants to find the answer.
> 
> P.S. Why didn't the original message just say permissions not set for X user ?
> 

I just sent a patch in, so that it gives a decent error message. Not
sure if it will get applied or not...


> Regards to all that answered before,
> 
> John Turner
> 
> "Just because you do not know the answer
> does not mean that someone else does"
> Stephen J. Gould, {rip}
> 
> ---------------------------(end of broadcast)---------------------------
> TIP 6: Have you searched our list archives?
> 
> http://archives.postgresql.org
-- 
Brett Schwarz
brett_schwarz AT yahoo.com



Re: PGACCESS Error Relative Path @ export table

From
"Andreas Kretzer"
Date:
On 31.07.2002 at 12:55 John L. Turner wrote:

>Andreas Kretzer, wanted me to know...
>> On 30.07.2002 at 17:45 John L. Turner wrote:
>> >Hi:
>> >
>> >Newbe trying to learn pgaccess' import / export of tables
>> >
>> >ERROR
>> >"Relative Path not allowed for servers side copy command"
>> >
>> >Version downloaded today (Tuesday 30 July 02) was 0.98.8
>> >( even though the/pgaccess/lib/mainlib.tcl says 0.98.7 )
>> >
>> >I opened a test database, created with the command
>> >psql mytestdb <  /pgaccess/demo/formdemo.sql
>> >
>> >Open Data base with no local host given,
>> >AND with my local host IP #
>> >
>> >I did start postmaster with -i
>> >
>> >Then From Main pgaccess Menu: Database | Export Table
>> >Tried to export the table phonebook, received above ERROR
>> >
>> >I entered the path /home/jlt/phonebook.txt
>> >ERROR received.
>>
>> Are you sure that the error was the same? It might have been
>> 'access denied'. Try /tmp/phonebook.txt
>>
>> >Also tested ~/phonebook.txt
>> >Also tested 192.168.110.42:~/phonebook.txt
>>
>> Hmm... It should have been possible (except it is explicitly
>> catched by pgaccess. But of course the home directory
>> would have been that of the postgres backend processes'
>> user.
>>
>> Hope this helps
>> Andreas
>_________________
>Seem to have found the answer ( at least ONE answer that worked)
>
>Turns out that the only directory that I have permission to write to is:
>/var/lib/pgsql/
>
>I started the postmaster -1  as user  postgres
>

This is probably the home directory of the user postgres.
But you should have access to /tmp too! But be sure that
there is no file of the name you choose generated by another
user. Files in /tmp are usually protected by a bit in the
directory attributes of to prevent other users from deleting
or changing files even if the directory itself has write permissions
for everybody.

Greetings
Andreas

>SO that leads to the bottom line Question:
>How does a user in postgresql obtain permissions to other directories ?
>
>Thanks to anyone for a kick in pants to find the answer.
>
>P.S. Why didn't the original message just say permissions not set for X
>user ?
>
>Regards to all that answered before,
>
>John Turner
>
>"Just because you do not know the answer
>does not mean that someone else does"
>Stephen J. Gould, {rip}
>
>---------------------------(end of broadcast)---------------------------
>TIP 6: Have you searched our list archives?
>
>http://archives.postgresql.org





Re: PGACCESS Error Relative Path @ export table

From
"John L. Turner"
Date:
Brett Schwarz, wanted me to know...
> On Wed, 2002-07-31 at 05:55, John L. Turner wrote:
> > Andreas Kretzer, wanted me to know...
> >
> > > On 30.07.2002 at 17:45 John L. Turner wrote:
> > > >Hi:
> > > >
> > > >Newbe trying to learn pgaccess' import / export of tables
> > > >
> > > >ERROR
> > > >"Relative Path not allowed for servers side copy command"
> > > >
> > > >Version downloaded today (Tuesday 30 July 02) was 0.98.8
> > > >( even though the/pgaccess/lib/mainlib.tcl says 0.98.7 )
> > > >
> > > >I opened a test database, created with the command
> > > >psql mytestdb <  /pgaccess/demo/formdemo.sql
> > > >
> > > >Open Data base with no local host given,
> > > >AND with my local host IP #
> > > >
> > > >I did start postmaster with -i
> > > >
> > > >Then From Main pgaccess Menu: Database | Export Table
> > > >Tried to export the table phonebook, received above ERROR
> > > >
> > > >I entered the path /home/jlt/phonebook.txt
> > > >ERROR received.
> > >
> > > Are you sure that the error was the same? It might have been
> > > 'access denied'. Try /tmp/phonebook.txt
> > >
> > > >Also tested ~/phonebook.txt
> > > >Also tested 192.168.110.42:~/phonebook.txt
> > >
> > > Hmm... It should have been possible (except it is explicitly
> > > catched by pgaccess. But of course the home directory
> > > would have been that of the postgres backend processes'
> > > user.
> > >
> > > Hope this helps
> > > Andreas
> >
> > _________________
> > Seem to have found the answer ( at least ONE answer that worked)
> >
> > Turns out that the only directory that I have permission to write to is:
> > /var/lib/pgsql/
> >
> > I started the postmaster -1  as user  postgres
> >
> > SO that leads to the bottom line Question:
> > How does a user in postgresql obtain permissions to other directories ?
>
> This is at the OS level. Pgaccess is really only accessing the file via
> the filesystem of the OS that you are running. You need to make sure
> that the user you start PGAccess with has permissions for those
> files/directories. For example, on Unix machines, you would use chmod.
> If you are on a machine that is maintained by someone else, then you
> would need to ask that person to set the permissions correctly for you.
>

1) My system is Linux SuSE 8.0 release with    postgresql-7.2-70    pgaccess 0.98.8

2) The database I opened, was created by user postgres as follows:>psql mytestdb <
/usr/share/doc/packages/postgresql-tk/formdemo.sql exited from psql . 

3) I started pgaccess as user jlt ( normal user me ). @  /home/jlt  Within pgaccess, USERS tab, I added jlt (me) as a
user. 

4) Tested import and exporting of a table:    Can not get permission to read or write to anything    other than
directory:    /var/lib/pgsql    Was able to import and export files from that one directory. 

Is it a security issue that prevents me as a normal user from
accessing those other directories, if so, why do I have permission
to /var/lib/pgsql to copy the file to another directory ( I assume
a fat32 mount could allow me to steal that data, because
once there, anyone could read/write to it...
Seems like a tangle web has been woven ;-)

> > Thanks to anyone for a kick in pants to find the answer.
> >
> > P.S. Why didn't the original message just say permissions not set for X
> > user ?
>
> I just sent a patch in, so that it gives a decent error message. Not
> sure if it will get applied or not...
>

Would like to see a simular corrected message when trying to Create a NEW
database with pgaccess:

"Tcl error executing pg_exec create database mytestdb

is not a valid postgresq connection"

That type of message is not too helpful to newbies like me.

Best regards for quick replies!
John Turner


Re: PGACCESS Error Relative Path @ export table

From
"C. Maj"
Date:
On Wed, 31 Jul 2002, John L. Turner waxed:

<snip>

> > > P.S. Why didn't the original message just say permissions not set for X
> > > user ?
> >
> > I just sent a patch in, so that it gives a decent error message. Not
> > sure if it will get applied or not...

No, I just put some stuff in CVS to allow for import/export a la the
psql \copy command, which is really COPY FROM stdin/stdout
It's at pgaccess.org

> Would like to see a simular corrected message when trying to Create a NEW
> database with pgaccess:
>
> "Tcl error executing pg_exec create database mytestdb
>
> is not a valid postgresq connection"
>
> That type of message is not too helpful to newbies like me.
>
> Best regards for quick replies!
> John Turner

I didn't know you could make new databases with pgaccess.  Huh.  I tried
it and it seems to work, but my pg_hba.conf is not permissive enough to
let me connect to the new database.  Perhaps that is your problem?  Are
you connecting as a user who has privilege enough to create databases?

--Chris


-- 

cmaj_at_freedomcorpse_dot_info
0xC0051F6A
5EB8 2035 F07B 3B09 5A31  7C09 196F 4126 C005 1F6A




Re: PGACCESS Error Relative Path @ export table

From
"John L. Turner"
Date:
C. Maj, wanted me to know...
> On Wed, 31 Jul 2002, John L. Turner waxed:
>
> <snip>
>
> > > > P.S. Why didn't the original message just say permissions not set for
> > > > X user ?
> > >
> > > I just sent a patch in, so that it gives a decent error message. Not
> > > sure if it will get applied or not...
>
> No, I just put some stuff in CVS to allow for import/export a la the
> psql \copy command, which is really COPY FROM stdin/stdout
> It's at pgaccess.org
>
> > Would like to see a simular corrected message when trying to Create a NEW
> > database with pgaccess:
> >
> > "Tcl error executing pg_exec create database mytestdb
> >
> > is not a valid postgresq connection"
> >
> > That type of message is not too helpful to newbies like me.
> >
> > Best regards for quick replies!
> > John Turner
>
> I didn't know you could make new databases with pgaccess.  Huh.  I tried
> it and it seems to work, but my pg_hba.conf is not permissive enough to
> let me connect to the new database.  Perhaps that is your problem?  Are
> you connecting as a user who has privilege enough to create databases?
>
> --Chris

Mine looks like this...

pg_hba.conf
# TYPE     DATABASE    IP_ADDRESS    MASK               AUTH_TYPE  AUTH_ARGUMENT

local      all                                          trust
host       all         127.0.0.1     255.255.255.255    trust
_________________________

I did not MAKE a new database in pgaccess.
I was able to ONLY add to an existing one,
created by user postgres as follows:
postgres@X:~>psql mytestdb <  /usr/share/doc/packages/postgresql-tk/formdemo.sql

Question:
What user were you when you created a NEW pgaccess database ?
You maybe on to something here.


--
John


Re: PGACCESS Error Relative Path @ export table

From
"John L. Turner"
Date:
C. Maj, wanted me to know...

<snip>
> I didn't know you could make new databases with pgaccess.  Huh.  I tried
> it and it seems to work, but my pg_hba.conf is not permissive enough to
> let me connect to the new database.  Perhaps that is your problem?  Are
> you connecting as a user who has privilege enough to create databases?
>
> --Chris

_____________ WELL _____
I just discovered that Any user that can open any existing database,
with  pgaccess, can (while that 1st db is still open!)
create another NEW empty database.

Then close the first one, open the New Empty one that was just created and
create new tables.

New features or bugs ?
--
John


Re: PGACCESS Error Relative Path @ export table

From
Oliver Elphick
Date:
On Wed, 2002-07-31 at 15:45, John L. Turner wrote:
> > > SO that leads to the bottom line Question:
> > > How does a user in postgresql obtain permissions to other directories ?
> >
> > This is at the OS level. Pgaccess is really only accessing the file via
> > the filesystem of the OS that you are running. You need to make sure
> > that the user you start PGAccess with has permissions for those
> > files/directories. For example, on Unix machines, you would use chmod.
> > If you are on a machine that is maintained by someone else, then you
> > would need to ask that person to set the permissions correctly for you.
...
> 3) I started pgaccess as user jlt ( normal user me ). @  /home/jlt
>    Within pgaccess, USERS tab, I added jlt (me) as a user. 

Your own user name is irrelevant, because it is not you but the backend
which is trying to write the file.  Therefore the relevant user is
'postgres' (if that is the user that started the postmaster).

-- 
Oliver Elphick                                Oliver.Elphick@lfix.co.uk
Isle of Wight, UK                            
http://www.lfix.co.uk/oliver
GPG: 1024D/3E1D0C1C: CA12 09E0 E8D5 8870 5839  932A 614D 4C34 3E1D 0C1C
========================================   "And why call ye me, Lord, Lord, and do not the things      which I say?"
              Luke 6:46 
 



Re: PGACCESS Error Relative Path @ export table

From
"John L. Turner"
Date:
Oliver Elphick, wanted me to know...
> On Wed, 2002-07-31 at 15:45, John L. Turner wrote:
> > > > SO that leads to the bottom line Question:
> > > > How does a user in postgresql obtain permissions to other directories
> > > > ?
> > >
> > > This is at the OS level. Pgaccess is really only accessing the file via
> > > the filesystem of the OS that you are running. You need to make sure
> > > that the user you start PGAccess with has permissions for those
> > > files/directories. For example, on Unix machines, you would use chmod.
> > > If you are on a machine that is maintained by someone else, then you
> > > would need to ask that person to set the permissions correctly for you.
>
> ...
>
> > 3) I started pgaccess as user jlt ( normal user me ). @  /home/jlt
> >    Within pgaccess, USERS tab, I added jlt (me) as a user.
>
> Your own user name is irrelevant, because it is not you but the backend
> which is trying to write the file.  Therefore the relevant user is
> 'postgres' (if that is the user that started the postmaster).

Thank you for the reply !

Final question on that subject would be:

What is the purpose of the List of users that is set in:            pgaccess [ Tab: Users ] ?

I noted that postgres is not in that list in the demo database supplied:
.............  <    formdemo.sql

Regards,
John


--
John