I am doing postgresql exercise from command line using wsl ubuntu. When I want to create a csv file using my tables I get the following error.
test=# \copy (SELECT * FROM person LEFT JOIN car ON car.id = person.car_id) TO '/home/ubuntu/source/results.csv' DELIMITER ',' CSV HEADER;/home/ubuntu/source/results.csv: Permission denied
I am not very experienced in using Linux and the command line. When I browsed the internet a little, I saw that they changed the read-write permissions of the csv file, but I want to create a file that does not exist.