I've installed PG 9.5 (
/usr/pgsql-9.5/) and when I start it manually with
postgres -D it has no problems, but if I try to use
systemctl I get an error. By looking to
journalctl -xen output, I see:
/bin/sh /usr/postgresql-9.5/bin/postgresql95-check-db-dir: permission denied
These are the permissions:
-rwxr-xr-x. root root system_u:object_r:postgresql_exec_t:s0 postgresql95-checkdb_dir
I cannot understand if it's a SELinux problem or something else. Any help?
Putting PostgreSQL in permissive mode (for example
semanage permissive -a postgresql_t) solved the problem, but if I can, I want it to stay enforced. Do you know what kind of problem it is?