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:
- GitHub Thread – psycopg/psycopg2
- GitHub Thread – nginx/unit
- 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.
![[SOLVED / FIXED] Error: postgres port 5432 failed: could not open certificate file "/root/.postgresql/postgresql.crt": Permission denied 1 avatar 4](http://alitech.io/wp-content/uploads/2024/04/avatar-4.png)
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.