-1

I am running Manjaro Linux and trying to get familiar with PostgresSQL. I am attempting to import a csv file located at /home/antonnym/Downloads/persons.csv into a table on postgresql.

CREATE TABLE persons (
          id SERIAL, 
          first_name VARCHAR(50), 
          last_name VARCHAR(50), 
          dob DATE, 
          email VARCHAR(255), 
          PRIMARY KEY (id) 
);

\copy persons from '/home/antonnym/Downloads/persons.csv' delimiter ',' csv header;

I'm getting the error /home/antonnym/Downloads/persons.csv: Permission denied.

I'm using psql (PostgreSQL) 13.4 on Manjaro 21.2. How do I get the correct permission settings?

1 Answers1

0

Try run this command in Linux terminal:

chmod 777 /home/antonnym/Downloads/persons.csv