Skip to content
Advertisement

42501: INSUFFICIENT PRIVILEGE ERROR while querying in Postgresql

I am trying to query a database table in postgresql, but every time I run the below query it gives me the INSUFFICIENT PRIVILEGE error. What possibly could be the reason for such permission denied error. Also, I am using pgadmin tool in windows to connect the database which is in Linux environment. Below is the query I am running

While running the same query I am getting the below Error

Advertisement

Answer

The user running the query will need permissions to that table. You can grant them to that user with the GRANT statement. The below is an example that grants to PUBLIC

Also I have seen SELinux cause isses and places such as here mention it. I am not exactly sure of the command to turn SELinux off but you can see if it is running by using

User contributions licensed under: CC BY-SA
7 People found this is helpful
Advertisement