From: | Ulf Mehlig <umehlig(at)uni-bremen(dot)de> |
---|---|
To: | questions(at)postgresql(dot)org |
Subject: | COPY can t make file |
Date: | 2000-05-29 20:09:40 |
Message-ID: | 14642.52868.621559.704150@vmgateway.vmnet.localnet |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Hello out there,
I've found a somehow strange behaviour of postgreSQL 7.0; consider the
following:
1. user umehlig, in psql:
=========================
db=# COPY blatt TO '/usr/local/tmp/blatt.txt' USING DELIMITERS '|' with null as '';
ERROR: COPY command, running in backend with effective uid 1100,
could not open file '/usr/local/tmp/blatt.txt' for writing. Errno =
Keine Berechtigung (13). -- "Keine Berechtigung": "no permission"
2. user postgres, outside psql:
===============================
[postgres(at)pandora3 pgsql]$ grep 1100 /etc/passwd
postgres:*:1100:1100:PostgreSQL Super User:/usr/local/pgsql:/bin/sh
[postgres(at)pandora3 pgsql]$ grep postgres /etc/group
users::100:umehlig,postgres
postgres:*:1100:postgres
[postgres(at)pandora3 pgsql]$ touch /usr/local/tmp/blatt.txt
[postgres(at)pandora3 pgsql]$ ls -ld /usr/local/tmp/ /usr/local/tmp/blatt.txt
drwxrwxr-t 3 root users 144 May 29 21:47 /usr/local/tmp/
-rw-rw-r-- 1 postgres postgres 19011 May 29 21:48 /usr/local/tmp/blatt.txt
3. user umehlig, in psql:
=========================
db=# COPY blatt TO '/usr/local/tmp/blatt.txt' USING DELIMITERS '|' with null as '';
COPY
The COPY command does succeed only after manually generating the file
-- is there something wrong with my permissions, or is there something
wrong with the COPY command?
Thanxs,
Ulf
psql (PostgreSQL) 7.0.0
RedHat 6.1/i386, kernel 2.2.14
--
======================================================================
Ulf Mehlig <ulf(dot)mehlig(at)zmt(dot)uni-bremen(dot)de>
Center for Tropical Marine Ecology/ZMT, Bremen, Germany
----------------------------------------------------------------------
From | Date | Subject | |
---|---|---|---|
Next Message | Alfred Perlstein | 2000-05-29 20:17:29 | Postgresql usage clip. |
Previous Message | Erich | 2000-05-29 19:57:23 | Re: Postgresql usage clip. |