I'm trying to create a symbolic link on
/var/lib/pgsql/data/pg_hba.conf (default path on Fedora) pointing to the real file located somewhere else, for example
/var/lib/pgsql/data/pg_hba.conf -> /home/pg_hba.conf (command for this example:
sudo ln -sf /home/pg_hba.conf /var/lib/pgsql/data/pg_hba.conf).
/home/pg_hba.conf permissions (
-rw-------), owner (
postgres) and group (
postgres) to be just like the original
/var/lib/pgsql/data/pg_hba.conf file, I even tried to
chmod 777. When I switch to user
postgres and I
cat /var/lib/pgsql/data/pg_hba.conf (which is now a symlink) it successfully prints the content of the
However when I try to apply the changes by doing
sudo systemctl restart postgresql I get the following error
Job for postgresql.service failed because the control process exited with error code.
See "systemctl status postgresql.service" and "journalctl -xeu postgresql.service" for details.
I checked the logs but there's no other useful information.
It's only working when I point my symlink to a file in the same directory (
/var/lib/pgsql/data/) which is totally useless (ex:
/var/lib/pgsql/data/pg_hba.conf -> /var/lib/pgsql/data/pg_hba.conf.bak)
If I point to anywhere else it doesn't work, even in
/var/lib/pgsql which is actually the Home directory of the
I'm new to Linux so I tried to create a symbolic link with my
~/.bashrc file just for the sake of trying (ex:
~./bashrc -> /home/.bashrc) I wrote an
echo "TEST!" inside this file and applied the new configuration with
. ~/.bashrc and it works just fine, my
TEST! is successfully printed out.
So what's the deal with PostgreSQL?
How can I fix this error and keep a symbolic link on the
Thanks for your answers