Thread: answer my question, please!!!

answer my question, please!!!

From
"ria ulfa"
Date:
i want to copy table from file with command:
     COPY log FROM '/tmp/logfile.txt';
but there is error:
     ERROR: could not open file "/tmp/logfile.txt" for reading: Permission denied
what can i do for repair this error??
thanks for the answer..

Re: answer my question, please!!!

From
"Ewald Geschwinde"
Date:


2008/7/18 ria ulfa <riakdr@gmail.com>:
i want to copy table from file with command:
     COPY log FROM '/tmp/logfile.txt';
but there is error:
     ERROR: could not open file "/tmp/logfile.txt" for reading: Permission denied
what can i do for repair this error??
thanks for the answer..

you should use a user which can read this file or change permissions
this is not a postgres problem

--
Ewald Geschwinde

Re: answer my question, please!!!

From
Tino Schwarze
Date:
On Fri, Jul 18, 2008 at 04:29:42PM +0700, ria ulfa wrote:
> i want to copy table from file with command:
>      COPY log FROM '/tmp/logfile.txt';
> but there is error:
>      ERROR: could not open file "/tmp/logfile.txt" for reading: Permission
> denied
> what can i do for repair this error??
> thanks for the answer..

The file is read by the server process, therefore, the user the server
process runs as needs read permissions for the file.

HTH,

Tino.

PS: The more exclamation marks you use, the lower get the chances that
you're taken serious and actually get a response.

--
'Multiple exclamation marks,' he went on, shaking his head, 'are a
sure sign of a diseased mind.' (Terry Pratchett)

www.craniosacralzentrum.de
www.forteego.de

Re: answer my question, please!!!

From
chris
Date:
riakdr@gmail.com ("ria ulfa") writes:
> i want to copy table from file with command:
>      COPY log FROM '/tmp/logfile.txt';
> but there is error:
>      ERROR: could not open file "/tmp/logfile.txt" for reading: Permission denied
> what can i do for repair this error??
> thanks for the answer..

It's worth observing that the louder the demands are in the subject
line, the less likely that people are to *want* to volunteer
assistance.

The problem here is that COPY accesses data as whatever Unix user is
running the database, typically "postgres" or "pgsql".

Presumably that user hasn't rights to access the file
"/tmp/logfile.txt".  Perhaps that needs to be changed.
--
select 'cbbrowne' || '@' || 'linuxfinances.info';
http://cbbrowne.com/info/lsf.html
Rules  of the  Evil Overlord  #145. "My  dungeon cell  decor  will not
feature exposed pipes.  While they add to the  gloomy atmosphere, they
are good  conductors of vibrations and  a lot of  prisoners know Morse
code." <http://www.eviloverlord.com/>