Re: permissions failure to copy csv data - Mailing list pgsql-novice

From Tom Lane
Subject Re: permissions failure to copy csv data
Date
Msg-id 19528.1286635641@sss.pgh.pa.us
Whole thread Raw
In response to permissions failure to copy csv data  (e-letter <inpost@gmail.com>)
Responses Re: permissions failure to copy csv data  (e-letter <inpost@gmail.com>)
List pgsql-novice
e-letter <inpost@gmail.com> writes:
> The following command was entered from normal user account where csv files are:

> COPY newdatabasenametable FROM '/path/to/file.csv' WITH CSV;
> ERROR:  could not open file "/path/to/file.csv" for reading: Permission denied

The postgres account either doesn't have permission to read that file,
or doesn't have permission to search one of the directories in the path.

> su root
> su postgres
> psql newdatabasename
> could not change directory to "/path/to

This would work better with "su -l postgres", so that you don't end
up with a situation where psql is being started in a directory it
has no permissions for.

            regards, tom lane

pgsql-novice by date:

Previous
From: Helgi Örn Helgason
Date:
Subject: Re: MySQL --> PostgreSQL with PHP
Next
From: Mark Kelly
Date:
Subject: Re: MySQL --> PostgreSQL with PHP