Reputation: 67
I am trying the following command load schema and data from .dump file :
psql proj1 -f /Users/utkarshatri/Desktop/proj1/mymyunsw.dump
but it says permission denied.
the folder containing the .dump file has read write permissions for postgres
total 101728
drwxr-xr-x@ 4 utkarshatri staff 136 24 Mar 05:41 ./
drwx------@ 23 utkarshatri staff 782 24 Mar 06:18 ../
-rwxrw-rw-@ 1 utkarshatri staff 52080321 8 Mar 00:30 mymyunsw.dump*
-rwxr--r--@ 1 utkarshatri staff 2130 8 Mar 00:30 proj1.sql*
simple cat on terminal works but returns permission denied on postgres commandline
How do I fix this?
Any help would be appreciated.
Upvotes: 0
Views: 2048
Reputation: 28579
The issue seems to be not with the current directory, but the directory, one level above:
drwx------@ 23 utkarshatri staff 782 24 Mar 06:18 ../
This is showing that only your user has the permissions required to enter the project directory. Try running this
chmod a+rx ../
This will change the permissions such that anyone on the system can open and look inside the directory, but still, only you will be able to write.
Upvotes: 1