permissions failure to copy csv data

From: e-letter <inpost(at)gmail(dot)com>
To: pgsql-novice(at)postgresql(dot)org
Subject: permissions failure to copy csv data
Date: 2010-10-09 07:41:14
Message-ID: AANLkTinEskECORCCoXt9vJM5QApdAPriMnYvxREbrSdg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

Readers,

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

Superuser X created by linux root account but unable to read csv files
even though permissions are read-execute for others (tried to change
to read-write-execute, no success):

su root
su postgres
createuser X
createdb -U X newdatabasename

When changing to postgres account:

pwd: /path/to/

su root
su postgres
psql newdatabasename
could not change directory to "/path/to
Welcome to psql 8.2.13, the PostgreSQL interactive terminal.

Type: \copyright for distribution terms
\h for help with SQL commands
\? for help with psql commands
\g or terminate with semicolon to execute query
\q to quit

How do I configure the permissions correctly?

Yours,

postgresql(at)conference(dot)jabber(dot)org
postgresql8213
mandriva2008

Responses

Browse pgsql-novice by date

  From Date Subject
Next Message Helgi Örn Helgason 2010-10-09 08:56:33 Re: MySQL --> PostgreSQL with PHP
Previous Message Andrej 2010-10-09 04:55:23 Re: Like and Not LIke