postges: psql csv import fails although file exists
The most common reason for COPY failing is what is suggested in the hint, but then the error is a "Permission denied".

Since you get "No such file or directory", and a simple ls shows that the file exists, there are first a few plausible explanations that you want to check:


/home/centos/bugs.csv is a soft link pointing to an non-existing file. Use ls -l to be sure an check the destination if it's a soft link.
127.0.0.1:5432 is redirected at the network level to a different machine. This technique is widely used to connect to remote services through SSH tunnels.
Your OS uses fancy security/isolation features that forbids postgres to read /home/centos/bugs.csv without issuing a Permission denied error. Try ls -l /home/centos/bugs.csv under the postgres OS account.
Your server and client don't run under the same MOUNT namespace, due to containerization.


In cases #2 #3 or #4, just use \copy as suggested in the HINT part of the error message.