Re: Can't read input file

From: Desmond Coughlan <psql(at)zeouane(dot)org>
To: pgsql-novice(at)postgresql(dot)org
Subject: Re: Can't read input file
Date: 2003-01-24 16:45:37
Message-ID: 20030124164537.GS33534@lievre.voute.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

Le Fri, Jan 24, 2003 at 09:13:50AM -0600, Devinder K Rajput a écrit ...

> I am trying to load a table by using the COPY command. I am running the
> perl script my self and the data is located in the same directory as the
> perl script. However, I get the following error:
>
> ERROR: COPY command, running in backend with effective uid 501, could not
> open file
> '/data/db/db_scripts/counterpoint/contract_IMCODF_SUB_CAT_output' for
> reading. Errno = Permission denied (13).
>
> This output file is created by the perl script and has the following
> permissions:
>
> -rw-rw-r-- 1 drajput drajput 8934 Jan 24 09:00
> contract_IMCODF_SUB_CAT_output
>
> Any ideas on what is happening. Thanks,

As a newbie myself, my advice probably isn't worth much, but it's almost
certainly do do with permissions in the directory. I had this same
problem, even though I was running psql as 'desmond', and the files were in
/home/desmond/sql.

I solved it by placing the txt file into /tmp. Perhaps 'solved' isn't the
appropriate word ... 'kludged', anyone ..? :-)

--
Desmond Coughlan |'Io non mori, e non rimasi vivo'
desmond(at)zeouane(dot)org
http://www.zeouane.org

In response to

Responses

Browse pgsql-novice by date

  From Date Subject
Next Message Jason Earl 2003-01-24 17:25:25 Re: Initial user and RedHat 8.0
Previous Message Devinder K Rajput 2003-01-24 15:13:50 Can't read input file