Remove lock: file does not exist with Synology SFTP

Hello,

i created my first restic backup today and the experience was great. But in the end i get the error that the lock-file cannot be deleted because the file does not exist.

I used the command restic -r sftp://synology-nas:/path backup ~

But when i log in with the restic user i created, i can see and remove the lock files. Works with SSH and SFTP manually.
restic unlock does result in the same error.
I tried restic cache --cleanupno old cache dirs found

I tried with the restic version in the Ubuntu installer and the latest version 0.12.1

Has anybody here had the same problems or can point me to a solution?

Here’s the error output:

Remove(<lock/de39bf3405>) returned error, retrying after 15.394871241s: file does not exist
Warning: at least one source file could not be read
Remove(<lock/de39bf3405>) returned error, retrying after 507.606314ms: file does not exist
Remove(<lock/de39bf3405>) returned error, retrying after 985.229971ms: file does not exist
Remove(<lock/de39bf3405>) returned error, retrying after 803.546856ms: file does not exist
Remove(<lock/de39bf3405>) returned error, retrying after 1.486109007s: file does not exist
Remove(<lock/de39bf3405>) returned error, retrying after 2.070709754s: file does not exist
Remove(<lock/de39bf3405>) returned error, retrying after 3.67875363s: file does not exist
Remove(<lock/de39bf3405>) returned error, retrying after 4.459624189s: file does not exist
Remove(<lock/de39bf3405>) returned error, retrying after 6.775444383s: file does not exist
Remove(<lock/de39bf3405>) returned error, retrying after 15.10932531s: file does not exist
Remove(<lock/de39bf3405>) returned error, retrying after 13.811796615s: file does not exist
error in cleanup handler: file does not exist

I don’t know Synology NAS but on my Qnap, I can set that connections via (s)FTP only have rights to write into folders and not to delete. I’ve to enable/disable that for the whole share and this has priority over user rights.

Thank you for yor answer @underwoodblog!

It seems, i found the solution by myself. I deactived the recycle bin option for the backup volume and now restic doesn’t complain anymore. Will do some more testing if this really did fix it.

For the SFTP rights, i checked and even when i connected via sftp user@nas i could see and remove the files. From my understanding, restic should have used the same mechanics.

Do you guys think this is a bug?