Garbage collection failed: unexpected error on datastore traversal: Permission denied (os error 13)

feliceM

New Member
Jun 29, 2023
8
1
1
Hi there,
I have installed PBS in a VM on Proxmox VE.
I have added a datastore which is an smb share on a Synology NAS.
The backups are executed without problems or errors.
However, I noticed this error : garbage collection failed: unexpected error on datastore traversal: Permission denied (os error 13)

I checked the permission of the mapped mount folder/subfolders:
root@pbs:/# ls -l /mnt
drwxr-xr-x 2 root root 0 Feb 19 06:33 synology
root@pbs:/# cd /mnt/synology/
root@pbs:/mnt/synology# ls -l
drwxr-xr-x 2 root root 0 Feb 19 05:18 '#recycle'
drwxr-xr-x 2 root root 0 Feb 19 07:16 vm

I am not sure about what to do. I would appreciate some help.
 
Content of the datastore folder should be owned by the "backup" user (UID 34) and not root. I guess you mounted the SMB share for UID 0 and not 34?
 
  • Like
Reactions: feliceM
Content of the datastore folder should be owned by the "backup" user (UID 34) and not root. I guess you mounted the SMB share for UID 0 and not 34?
Thank you for the directions.
I have tried:
#//10.0.3.12/PBS /mnt/synology cifs username=PBS,password=xxxxx,iocharset=utf8,noperm 0 0
#//10.0.3.12/PBS /mnt/synology cifs username=PBS,password=xxxxx,iocharset=utf8,noperm,uid=34 0 0
//10.0.3.12/PBS /mnt/synology cifs username=PBS,password=xxxxx,iocharset=utf8,noperm,uid=34,gid=34 0 0

this is the last one:
root@pbs:~# ls -l /mnt/synology
total 0
drwxr-xr-x 2 backup backup 0 Feb 19 05:18 '#recycle'
drwxr-xr-x 2 backup backup 0 Feb 19 07:16 vm


root@pbs:~# id backup
uid=34(backup) gid=34(backup) groups=34(backup),26(tape)


I have unmounted, remounted, rebooted but I still have the same issue: Garbage collection failed: unexpected error on datastore traversal: Permission denied (os error 13)

It doesn't make sense to me.
 
Last edited:
Don't forget the hidden folders. ls -l /mnt/synology won't show you the hidden ".chunks" folder and so on. For that you need "ls -la".
 
  • Like
Reactions: feliceM
ok. But what now?

root@pbs:~# ls -la /mnt/synology
total 4
drwxr-xr-x 2 backup backup 0 Feb 19 06:33 .
drwxr-xr-x 3 root root 4096 Feb 19 06:05 ..
drwxr-xr-x 2 backup backup 0 Feb 19 06:10 .chunks
-rwxr-xr-x 1 backup backup 0 Feb 19 06:08 .lock
drwxr-xr-x 2 backup backup 0 Feb 19 05:18 '#recycle'
drwxr-xr-x 2 backup backup 0 Feb 19 07:16 vm

the second one from the top I think is /mnt. I should not change the ownership of such folder.
 
Last edited:
Thank you for pointing me in the right direction. I am sure that the changes you suggested would have been necessary in any case to get to the full functionality go GC. The last issue was resolved by deselecting some option relevant the recycle bin on the NAS. In the shared folder options, the option "Enable Recycle Bin" has a sub option "Restrict access to administrator only". Both options are selected by default. Deselecting the second one did it.
This was somehow suggested to me by Derek on this blog.
 
  • Like
Reactions: M-a-x-G

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!