On Postgres and permissions, cant read a file into a table

Поиск
Список
Период
Сортировка
Искать

On Postgres and permissions, cant read a file into a table

От:
Lars Forseth <larsf@powertech.no>
Дата:
Hi!
My troubles are not over! Postgres are up and running, but I receive the 
following error message in pgaccess when I try to import a file into a table 
in postgres:

"COPY "Gravtype" FROM '/home/larsf/DATA/gravtype.txt' USING DELIMITERS '"'

PostgreSQL error mesage:
ERROR: COPY command, running in backend with effective uid 26 could not open 
file '/home/larsf/DATA/gravtype.txt' for reading. Errno = Permission denied 
(13)."

This indicated some sort of permission trouble, so I first tried to change 
the ownership of the file (gravtype.txt) to "postgres"; but it changed 
notting; so I figure its' me who's running postgres with insufficent 
permissions! But how to change this?

Sorry for these recurring newbie questions, but I cant figure out this from 
the documentation.

Regards
larsf

PS; Someone mailed me and said that regarding my previous troubles getting 
postgres startet I should have received a mail (root I guess) which should 
have explained how to get it going. I cant find such a mail now, so I guess 
something failed there to during my overall installation of v 7.0 of SuSE.




-- 
--------------------------
Lars Forseth
http://www.uio.no/~forseth
MS WIN > /dev/null
TUX rules
--------------------------

Re: On Postgres and permissions, cant read a file into a table

От:
Tom Lane <tgl@sss.pgh.pa.us>
Дата:
Lars Forseth  writes:
> "COPY "Gravtype" FROM '/home/larsf/DATA/gravtype.txt' USING DELIMITERS '"'

> PostgreSQL error mesage:
> ERROR: COPY command, running in backend with effective uid 26 could not open 
> file '/home/larsf/DATA/gravtype.txt' for reading. Errno = Permission denied 
> (13)."

Are the permissions on /home/larsf and /home/larsf/DATA set to allow
user postgres to do lookups in those directories?

			regards, tom lane
FAQ