0

While trying to export a query result set from PGAdmin4 on PostgreSQL12 to a CSV I am encountering the following error:

ERROR:  could not open file "/home/linuxusername/Downloads/data.csv" for reading: Permission denied
HINT:  COPY FROM instructs the PostgreSQL server process to read a file. You may want a client-side facility such as psql's \copy.
SQL state: 42501

I'm somewhat new to PGAdmin but am familiar with Linux and SQL. Is there a configuration setting that I'm unaware of to allow PGAdmin to read and write to files and directories of Linux users?

Using the /tmp works fine, but it's a pain to have to keep moving files to and from other directories and it's seriously cramping my work flow and slowing me down. Any help is much appreciated.

2
  • the folder can not be acessed by the service, so choose another folder or see the rights to the folder
    – nbk
    Nov 19, 2020 at 21:08
  • I assume I could add a group to a user that would allow file read/write permissions from PGAdmin. Which user or group does pgadmin4 use by default? I've tried adding a user to the postgres group but that didn't seem to work. Perhaps I'm missing something more?
    – K8sN0v1c3
    Nov 19, 2020 at 21:44

0