From: | Oliver Elphick <olly(at)lfix(dot)co(dot)uk> |
---|---|
To: | Desmond Coughlan <psql(at)zeouane(dot)org> |
Cc: | pgsql-novice(at)postgresql(dot)org |
Subject: | Re: Can't read input file |
Date: | 2003-01-24 18:30:19 |
Message-ID: | 1043433018.4039.5.camel@linda.lfix.co.uk |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-novice |
On Fri, 2003-01-24 at 16:45, Desmond Coughlan wrote:
> 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,
Most likely you do not have execute permissions set on one of the
directories in the path to that file. All the directories must have
execute (search) permission and the file itself must have read
permission set for the user under whose id the postmaster is running.
And of course, the file must be on the same machine that the postmaster
is running on.
If it is not possible to satisfy those conditions, you can use \copy in
psql instead; the input file is opened by the frontend instead of the
backend.
--
Oliver Elphick Oliver(dot)Elphick(at)lfix(dot)co(dot)uk
Isle of Wight, UK http://www.lfix.co.uk/oliver
GPG: 1024D/3E1D0C1C: CA12 09E0 E8D5 8870 5839 932A 614D 4C34 3E1D 0C1C
========================================
"If anyone has material possessions and sees his
brother in need but has no pity on him, how can the
love of God be in him?"
I John 3:17
From | Date | Subject | |
---|---|---|---|
Next Message | Chad Thompson | 2003-01-24 21:28:09 | Copy Questions |
Previous Message | Eft, Aaron | 2003-01-24 18:09:31 | Re: Starting postgresql server in RedHat 8.0 |