pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tino Schwarze <postgresql@tisc.de>
To: pgsql-admin@postgresql.org
Subject: Re: ask...!!!
Date: Tue, 1 Jul 2008 11:20:00 +0200
Message-ID: <20080701092000.GA25625@easy2.in-chemnitz.de> (raw)
In-Reply-To: <9c3360200807010112g781b4521v88b1fd2c7c400b8c@mail.gmail.com>
References: <9c3360200807010112g781b4521v88b1fd2c7c400b8c@mail.gmail.com>

On Tue, Jul 01, 2008 at 03:12:39PM +0700, ria ulfa wrote:
> i use linux fedora 7 and database PostgreSQL 8.
> i want to copy table in postgre to a file.
> i used code : simps=# COPY log TO '/root/documents/log.sql';
>       note= simps: name of database
> but there is error:  could not open file "/root/documents/log.sql" for
> writing: Permission denied
> what can i do for repair this error??

The user running the database (usually postgres) cannot write to root's
home directory. Simply specify another location, e.g. /tmp/log.sql . The
"COPY TO" command is executed by the server process on the server, so
this process needs the permissions to write the file.

HTH,

Tino.

PS: Please send your mail only once - I got it three times.

-- 
"What we nourish flourishes." - "Was wir nähren erblüht."

www.craniosacralzentrum.de
www.forteego.de



view thread (8+ messages)  latest in thread

Message-ID: <20080701092000.GA25625@easy2.in-chemnitz.de>
Permalink:  ../20080701092000.GA25625@easy2.in-chemnitz.de/
Also on:    postgresql.org/message-id/20080701092000.GA25625@easy2.in-chemnitz.de

 · 

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-admin@postgresql.org
  Cc: postgresql@tisc.de
  Subject: Re: ask...!!!
  In-Reply-To: <20080701092000.GA25625@easy2.in-chemnitz.de>

* 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