Re: Can't read input file - Mailing list pgsql-novice

From Desmond Coughlan
Subject Re: Can't read input file
Date
Msg-id 20030124164537.GS33534@lievre.voute.net
Whole thread Raw
In response to Can't read input file  ("Devinder K Rajput" <Devinder.Rajput@ipaper.com>)
Responses Re: Can't read input file
List 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@zeouane.org
http://www.zeouane.org

Attachment

pgsql-novice by date:

Previous
From: "Devinder K Rajput"
Date:
Subject: Can't read input file
Next
From: Jason Earl
Date:
Subject: Re: Initial user and RedHat 8.0