You are not logged in.

#1 2019-09-28 12:42:14

Xigi
Member
From: online
Registered: 2013-11-27
Posts: 15

permission denied when importing sql files in postgresql

I am setting up postgresql by following the instructions on the wiki https://wiki.archlinux.org/index.php/PostgreSQL
I've created a new database and I want to import a .sql file with owner postgres, permissions 766, but when I do

 \i /opt/sch.sql 

inside psql I get the permission denied error..

Last edited by Xigi (2019-09-28 13:00:34)

Offline

#2 2019-09-28 22:42:31

Swiggles
Member
Registered: 2014-08-02
Posts: 266

Re: permission denied when importing sql files in postgresql

It is not clear if it is a permission error due to file access or pg denying anything in its database.
Could you please show the launching procedure and proper errors?

Do you have AppArmor/SEL running? What happens if you move the file to /tmp or some other location? What happens when you write a simple query in your file instead?

Offline

Board footer

Powered by FluxBB