Erro permission pgbackrest

Hello,
I’ve checked several forums but no solution. Has anyone experienced this and managed to resolve it?

Thank you.

2024-06-25 18:27:20.820 EDT [18064] DETAIL: The failed archive command was: pgbackrest --stanza=bkplocal archive-push pg_wal/00000001000000000000001A
ERROR: [103]: unable to find a valid repository:
repo1: [FileOpenError] unable to load info file ‘/var/lib/pgbackrest/archive/bkplocal/archive.info’ or ‘/var/lib/pgbackrest/archive/bkplocal/archive.info.copy’:
FileOpenError: unable to open file ‘/var/lib/pgbackrest/archive/bkplocal/archive.info’ for read: [13] Permission denied
FileOpenError: unable to open file ‘/var/lib/pgbackrest/archive/bkplocal/archive.info.copy’ for read: [13] Permission denied
HINT: archive.info cannot be opened but is required to push/get WAL segments.
HINT: is archive_command configured correctly in postgresql.conf?
HINT: has a stanza-create been performed?
HINT: use --no-archive-check to disable archive checks during backup if you have an alternate archiving scheme.
2024-06-25 18:27:21.829 EDT [18064] LOG: archive command failed with exit code 103
2024-06-25 18:27:21.829 EDT [18064] DETAIL: The failed archive command was: pgbackrest --stanza=bkplocal archive-push pg_wal/00000001000000000000001A
2024-06-25 18:27:21.830 EDT [18064] WARNING: archiving write-ahead log file “00000001000000000000001A” failed too many times, will try again later

Hi,

Looking at your error messages it seems that the UNIX account executing pgbackrest on the target destination doesn’t have permissions to enter and write into the directory

FileOpenError: unable to open file ‘/var/lib/pgbackrest/archive/bkplocal/

If this is a local directory then perhaps you can test permissions using the postgres account manually and if such is the case then update file permissions accordingly.

Hope this helps.

Hi Robert, how are you?
Yes, I did this procedure, but it wasn’t. I made all the settings in Debia, it works normally, however in Rock Linux this access is denied appears, however everything is the same as in Debian, I have already changed the permissions of these files, after the entire folder, but nothing works, I am using the Postgres user, I went through root, I created another user, without success. I found a tutorial from PGDay Paris, but it only shows the error, there is no solution information. Very strange.