Skip site navigation (1) Skip section navigation (2)

Re: Can't read input file

From: "Devinder K Rajput" <Devinder(dot)Rajput(at)ipaper(dot)com>
To: "Oliver Elphick" <olly(at)lfix(dot)co(dot)uk>
Cc: pgsql-novice(at)postgresql(dot)org, pgsql-novice-owner(at)postgresql(dot)org,"Desmond Coughlan" <psql(at)zeouane(dot)org>
Subject: Re: Can't read input file
Date: 2003-01-24 21:59:39
Message-ID: OF163A4894.08B391B2-ON86256CB8.00789EDE@ipaper.com (view raw or flat)
Thread:
Lists: 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(at)lfix(dot)co(dot)uk>
Sent by: pgsql-novice-owner(at)postgresql(dot)org
01/24/2003 12:30 PM

 
        To:     "Desmond Coughlan" <psql(at)zeouane(dot)org>
        cc:     pgsql-novice(at)postgresql(dot)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(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 


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

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



Responses

pgsql-novice by date

Next:From: Tom LaneDate: 2003-01-25 00:59:38
Subject: Re: Copy Questions
Previous:From: Chad ThompsonDate: 2003-01-24 21:28:09
Subject: Copy Questions

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group