Permission denied error when PostgreSQL uses 'rsync' in its backup jobs.
Issue
-
PostgreSQL returns a non-zero exit code while using rsync for the backup process. Rsync works fine from the command line.
sh: /usr/bin/rsync: Permission denied 2024-07-10 19:00:44.793 BST [2666298] FATAL: XX000: archive command failed with exit code 126 2024-07-10 19:00:44.793 BST [2666298] DETAIL: The failed archive command was: /usr/bin/rsync -a pg_wal/000000040000000300000068 /db/postgresql/pg13/archive/000000040000000300000068 && rsync -e ssh -a pg_wal/000000040000000300000068
Environment
- Red Hat Enterprise Linux 8
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.