Обсуждение: 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??
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??
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??
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??
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??
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??
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?? >
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
Στις 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
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