Received: from mailrtr04.ntelos.net (mailrtr04.ntelos.net [216.12.0.104]) by postgresql.org (Postfix) with ESMTP id DCB42474E49 for ; Wed, 31 Jul 2002 14:48:15 -0400 (EDT) Received: from wsogmm2 (chas-106-175.access.ntelos.net [216.12.106.175]) by mailrtr04.ntelos.net (8.12.1/8.12.1) with ESMTP id g6VImEQZ019278; Wed, 31 Jul 2002 14:48:14 -0400 Content-Type: text/plain; charset="iso-8859-1" From: "John L. Turner" Reply-To: jlt@wvinter.net Organization: JCI Inc. To: Brett Schwarz Subject: Re: PGACCESS Error Relative Path @ export table Date: Wed, 31 Jul 2002 14:45:05 +0000 User-Agent: KMail/1.4.2 References: <200207311255.19111.jlt@wvinter.net> <1028122329.25431.62.camel@thor> In-Reply-To: <1028122329.25431.62.camel@thor> Cc: pgsql-interfaces@postgresql.org MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Message-Id: <200207311445.05814.jlt@wvinter.net> X-Archive-Number: 200207/148 X-Sequence-Number: 2957 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.=20 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=20 a fat32 mount could allow me to steal that data, because=20 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