pg.ddx.io pgsql-admin@postgresql.org mailing list archive
help / color / mirror / Atom feedask...!!!
8+ messages / 6 participants
[nested] [flat]
* ask...!!!
@ 2008-07-01 08:12 ria ulfa <riakdr@gmail.com>
0 siblings, 5 replies; 8+ messages in thread
From: ria ulfa @ 2008-07-01 08:12 UTC (permalink / raw)
To: pgsql-admin
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??
^ permalink raw reply [nested|flat] 8+ messages in thread
* ask...!!!
@ 2008-07-01 08:18 ria ulfa <riakdr@gmail.com>
parent: ria ulfa <riakdr@gmail.com>
4 siblings, 1 reply; 8+ messages in thread
From: ria ulfa @ 2008-07-01 08:18 UTC (permalink / raw)
To: pgsql-admin
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??
^ permalink raw reply [nested|flat] 8+ messages in thread
* ask...!!!
@ 2008-07-01 08:19 ria ulfa <riakdr@gmail.com>
parent: ria ulfa <riakdr@gmail.com>
4 siblings, 0 replies; 8+ messages in thread
From: ria ulfa @ 2008-07-01 08:19 UTC (permalink / raw)
To: pgsql-admin
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??
^ permalink raw reply [nested|flat] 8+ messages in thread
* Re: ask...!!!
@ 2008-07-01 09:00 Gerd König <koenig@transporeon.com>
parent: ria ulfa <riakdr@gmail.com>
4 siblings, 0 replies; 8+ messages in thread
From: Gerd König @ 2008-07-01 09:00 UTC (permalink / raw)
To: ria ulfa <riakdr@gmail.com>; +Cc: pgsql-admin
Hello,
I don't think it's a good idea to store it under the /root directory,
since "normal" users like e.g. postgres don't have write permission
there (as the error message tells you).
You have to choose a directory where your database user definitely has
write permission.
bye-GERD-
ria ulfa schrieb:
> 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??
>
^ permalink raw reply [nested|flat] 8+ messages in thread
* Re: ask...!!!
@ 2008-07-01 09:18 Glyn Astill <glynastill@yahoo.co.uk>
0 siblings, 0 replies; 8+ messages in thread
From: Glyn Astill @ 2008-07-01 09:18 UTC (permalink / raw)
To: ria ulfa <riakdr@gmail.com>; pgsql-admin
You need to output it into a directory you have permission to write to.
Either change the permissions on documents, or write it into somewhere
you definately do have permissions (e.g. /tmp/log.sql) and then move it
to the desired location.
----- Original Message ----
From: ria ulfa <riakdr@gmail.com>
To: pgsql-admin@postgresql.org
Sent: Tuesday, 1 July, 2008 9:19:41 AM
Subject: [ADMIN] ask...!!!
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??
__________________________________________________________
Not happy with your email address?.
Get the one you really want - millions of new email addresses available now at Yahoo! http://uk.docs.yahoo.com/ymail/new.html
^ permalink raw reply [nested|flat] 8+ messages in thread
* Re: ask...!!!
@ 2008-07-01 09:20 Tino Schwarze <postgresql@tisc.de>
parent: ria ulfa <riakdr@gmail.com>
4 siblings, 0 replies; 8+ messages in thread
From: Tino Schwarze @ 2008-07-01 09:20 UTC (permalink / raw)
To: pgsql-admin
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
^ permalink raw reply [nested|flat] 8+ messages in thread
* Re: ask...!!!
@ 2008-07-01 09:21 Achilleas Mantzios <achill@matrix.gatewaynet.com>
parent: ria ulfa <riakdr@gmail.com>
4 siblings, 0 replies; 8+ messages in thread
From: Achilleas Mantzios @ 2008-07-01 09:21 UTC (permalink / raw)
To: pgsql-admin
Στις Tuesday 01 July 2008 11:12:39 ο/η ria ulfa έγραψε:
> 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 best thing you can do is get yourself familiar with a UNIX environment.
Apparently the user on behalf of which, you run psql, cannot write to /root/documents/log.
--
Achilleas Mantzios
^ permalink raw reply [nested|flat] 8+ messages in thread
* Re: ask...!!!
@ 2008-07-01 09:31 adam_pgsql <adam_pgsql@witneyweb.org>
parent: ria ulfa <riakdr@gmail.com>
0 siblings, 0 replies; 8+ messages in thread
From: adam_pgsql @ 2008-07-01 09:31 UTC (permalink / raw)
To: ria ulfa <riakdr@gmail.com>; +Cc: pgsql-admin
On 1 Jul 2008, at 09:18, 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??
>
you don't have permission to write to that file... either change the
permissions on the file or write to a file or directory in which you
do have permission, maybe to your home directory or something
adam
^ permalink raw reply [nested|flat] 8+ messages in thread
end of thread, other threads:[~2008-07-01 09:31 UTC | newest]
Thread overview: 8+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2008-07-01 08:12 ask...!!! ria ulfa <riakdr@gmail.com>
2008-07-01 08:18 ` ria ulfa <riakdr@gmail.com>
2008-07-01 09:31 ` adam_pgsql <adam_pgsql@witneyweb.org>
2008-07-01 08:19 ` ria ulfa <riakdr@gmail.com>
2008-07-01 09:00 ` Gerd König <koenig@transporeon.com>
2008-07-01 09:20 ` Tino Schwarze <postgresql@tisc.de>
2008-07-01 09:21 ` Achilleas Mantzios <achill@matrix.gatewaynet.com>
2008-07-01 09:18 Re: ask...!!! Glyn Astill <glynastill@yahoo.co.uk>
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