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

From Devinder K Rajput
Subject Re: Can't read input file
Date
Msg-id OF163A4894.08B391B2-ON86256CB8.00789EDE@ipaper.com
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  (Desmond Coughlan <psql@zeouane.org>)
List pgsql-novice

Thank you Desmond and Oliver.  The problem is fixed.  The directories did not have execute permissions set....That's what i get for using the -R flag with chmod.

kind regards,

Devinder Rajput
Stores Division Corporate Offices
Chicago, IL
(773) 442-6474



"Oliver Elphick" <olly@lfix.co.uk>
Sent by: pgsql-novice-owner@postgresql.org

01/24/2003 12:30 PM

       
        To:        "Desmond Coughlan" <psql@zeouane.org>
        cc:        pgsql-novice@postgresql.org
        Subject:        Re: [NOVICE] Can't read input file



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.Elphick@lfix.co.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


---------------------------(end of broadcast)---------------------------
TIP 5: Have you checked our extensive FAQ?

http://www.postgresql.org/users-lounge/docs/faq.html



pgsql-novice by date:

Previous
From: "Chad Thompson"
Date:
Subject: Copy Questions
Next
From: Tom Lane
Date:
Subject: Re: Copy Questions