# Erro permission pgbackrest

**URL:** <https://forums.percona.com/t/erro-permission-pgbackrest/31242>\
**Category:** PostgreSQL\
**Tags:** postgres\
**Created:** [June 25, 2024, 10:28pm UTC](https://forums.percona.com/t/erro-permission-pgbackrest/31242 "2024-06-25T22:28:02Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Roger\_Fialho](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/roger_fialho/32/17040_2.png) [@Roger\_Fialho](https://forums.percona.com/u/Roger_Fialho)\
**Post date:** [June 25, 2024, 10:28pm UTC](https://forums.percona.com/t/erro-permission-pgbackrest/31242/1 "2024-06-25T22:28:02Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Robert\_Bernier](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/robert_bernier/32/1367_2.png) [@Robert\_Bernier](https://forums.percona.com/u/Robert_Bernier)\
**Post date:** [June 26, 2024, 1:32pm UTC](https://forums.percona.com/t/erro-permission-pgbackrest/31242/2 "2024-06-26T13:32:39Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Roger\_Fialho](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/roger_fialho/32/17040_2.png) [@Roger\_Fialho](https://forums.percona.com/u/Roger_Fialho)\
**Post date:** [June 26, 2024, 7:44pm UTC](https://forums.percona.com/t/erro-permission-pgbackrest/31242/3 "2024-06-26T19:44:34Z")

</div>

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.
