Free Quote

Find us on SAP Ariba

Please Leave a Review

AliTech Solutions

Blog

[SOLVED / FIXED] Error: postgres port 5432 failed: could not open certificate file “/root/.postgresql/postgresql.crt”: Permission denied

Error :

postgres port 5432 failed: could not open certificate file “/root/.postgresql/postgresql.crt”: Permission denied

Problem Statement:

When working with Postgres Database

Verified Solution:

If you’ve encountered this error, a possible solution lies in a workaround shared by the community. A thread on GitHub (Link) discusses the problem, and a workaround is suggested in another thread (Link).

For Dockerfile users, the suggested solution involves adding the following line to your Dockerfile:

ENV PGSSLCERT /tmp/postgresql.crt

Reference:

  1. GitHub Thread – psycopg/psycopg2
  2. GitHub Thread – nginx/unit
  3. Stack Overflow – Django psycopg2 OperationalError

By following this workaround, you can potentially resolve the permission denied issue related to the postgresql.crt file and ensure a smooth Postgres Database connection on port 5432.

avatar 4

Zeeshan Ali Shah is a professional blog writer at AliTech Solutions, renowned for crafting engaging and informative content. He holds a degree from the University of Sindh, where he honed his expertise in technology. With a keen eye for detail and a passion for staying up-to-date on the latest tech trends, Zeeshan’s writing provides valuable insights to his readers. His expertise in the tech industry makes him a sought-after writer, and his work at AliTech Solutions has earned him a reputation as a trusted and knowledgeable voice in the field.

Leave a Comment

Your email address will not be published. Required fields are marked *

Recent Posts