pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Richard Huxton <dev@archonet.com>
To: Bhuvan A <bhuvanbk@yahoo.com>
To: pgsql-sql@postgresql.org
Subject: Re: While Using COPY COMMAND ...
Date: Fri, 6 Jul 2001 09:41:04 +0100
Message-ID: <003e01c105f7$66043fa0$1001a8c0@archonet.com> (raw)
References: <Pine.LNX.4.20.0107061153150.10925-100000@Larry.bks>

From: "Bhuvan A" <bhuvanbk@yahoo.com>

> hello sirs,,
>
> I am using PSQL client. I can able to copy the contents of a
> table to '/tmp/' directory. But Why can't i able to copy
> contents of a table to my home directory?
>
> But, i can redirect the output of a command (\o) to a file
> in my home directory..  How it gets succeed while the prev.
> doesn't????
>
> For your clarifications, here is the workflow.
>
>
> bhuvan=# copy f_addr_phones with oids to
> '/home/bhuvan/fap-table';
> ERROR:  COPY command, running in backend with effective uid
> 1015, could not open file '/home/bhuvan/fap-table' for

The "copy" command runs in the backend as user postgres (uid 1015) who quite
rightly doesn't have access to your home directory

Look into \copy instead - that acts from the client, so has your
permissions.

HTH

- Richard Huxton




view thread (5+ messages)  latest in thread

Message-ID: <003e01c105f7$66043fa0$1001a8c0@archonet.com>
Permalink:  ../003e01c105f7$66043fa0$1001a8c0@archonet.com/
Also on:    postgresql.org/message-id/003e01c105f7$66043fa0$1001a8c0@archonet.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: dev@archonet.com, bhuvanbk@yahoo.com
  Subject: Re: While Using COPY COMMAND ...
  In-Reply-To: <003e01c105f7$66043fa0$1001a8c0@archonet.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox