Red Hat Capsule upgrade fails with error: could not access the server configuration file "/var/lib/pgsql/data/postgresql.conf": Permission denied
Issue
- The upgrade process of a
Red Hat Capsuleis encountering an error stating could not access the server configuration file '/var/lib/pgsql/data/postgresql.conf': Permission denied. -
After performing an upgrade of the Red Hat Capsule, clients are encountering difficulties accessing the capsule. The capsule itself is displaying a 500 Internal Server Error message.
postgresql.service - PostgreSQL database server Loaded: loaded (/usr/lib/systemd/system/postgresql.service; enabled; vendor preset: disabled) Drop-In: /etc/systemd/system/postgresql.service.d └─postgresql.conf Active: failed (Result: exit-code) since Thu 2023-05-04 15:36:50 EDT; 6min ago Process: 1477 ExecStart=/usr/bin/postmaster -D ${PGDATA} (code=exited, status=2) Process: 1442 ExecStartPre=/usr/libexec/postgresql-check-db-dir postgresql (code=exited, status=0/SUCCESS) Main PID: 1477 (code=exited, status=2) May 04 15:36:49 capsule.example.com systemd[1]: Starting PostgreSQL database server... May 04 15:36:50 capsule.example.com postmaster[1477]: postmaster: could not access the server configuration file "/var/lib/pgsql/data/postgresql.conf": Permission denied May 04 15:36:50 capsule.example.com systemd[1]: postgresql.service: Main process exited, code=exited, status=2/INVALIDARGUMENT May 04 15:36:50 capsule.example.com systemd[1]: postgresql.service: Failed with result 'exit-code'. May 04 15:36:50 capsule.example.com systemd[1]: Failed to start PostgreSQL database server.type=AVC msg=audit(1683229010.392:79): avc: denied { getattr } for pid=1477 comm="postmaster" path="/var/lib/pgsql/data/postgresql.conf" dev="dm-3" ino=21332509 scontext=system_u:system_r:postgresql_t:s0 tcontext=unconfined_u:object_r:var_t:s0 tclass=file permissive=0
Environment
- Red Hat Satellite 6
- Red Hat Capsule 6
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.