Received: from localhost (unknown [200.46.204.183]) by postgresql.org (Postfix) with ESMTP id C220E6510C5 for ; Tue, 1 Jul 2008 06:52:15 -0300 (ADT) Received: from postgresql.org ([200.46.204.86]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 97352-04 for ; Tue, 1 Jul 2008 06:51:39 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from easy2.in-chemnitz.de (easy2.in-chemnitz.de [88.198.17.232]) by postgresql.org (Postfix) with ESMTP id 18B59650E83 for ; Tue, 1 Jul 2008 06:20:04 -0300 (ADT) Received: from localhost (localhost [127.0.0.1]) by easy2.in-chemnitz.de (Postfix) with ESMTP id EAF6547000B for ; Tue, 1 Jul 2008 11:20:00 +0200 (CEST) Received: from easy2.in-chemnitz.de ([127.0.0.1]) by localhost (easy.in-chemnitz.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id kVEpYvBe2ZJ9 for ; Tue, 1 Jul 2008 11:20:00 +0200 (CEST) Received: by easy2.in-chemnitz.de (Postfix, from userid 1013) id D586C470006; Tue, 1 Jul 2008 11:20:00 +0200 (CEST) Date: Tue, 1 Jul 2008 11:20:00 +0200 From: Tino Schwarze To: pgsql-admin@postgresql.org Subject: Re: ask...!!! Message-ID: <20080701092000.GA25625@easy2.in-chemnitz.de> References: <9c3360200807010112g781b4521v88b1fd2c7c400b8c@mail.gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <9c3360200807010112g781b4521v88b1fd2c7c400b8c@mail.gmail.com> User-Agent: Mutt/1.5.13 (2006-08-11) X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200807/8 X-Sequence-Number: 29618 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