Postgres will not start Error: FATAL: could not create lock file "/var/run/postgresql/.s.PGSQL.5002.lock": Permission denied
search cancel

Postgres will not start Error: FATAL: could not create lock file "/var/run/postgresql/.s.PGSQL.5002.lock": Permission denied

book

Article ID: 285788

calendar_today

Updated On:

Products

Carbon Black EDR (formerly Cb Response)

Issue/Introduction

  • service cb-pgsql start ends in failed state
  • cb-datagrid is unable to startup
  • /var/log/cb/pgsql/startup.log contains
    • FATAL:  could not create lock file "/var/run/postgresql/.s.PGSQL.5002.lock": Permission denied

Environment

  • EDR Server: All Supported Versions

Cause

The service cannot access /var/run/postgresql/

Resolution

  • Update permissions on /var/run/postgresql/
    • chmod 755 /var/run/postgresql/
    • chown cb:cb /var/run/postgresql