Using SFTP - permission denied

Initial backups run just fine, however whenever any files need to be deleted from the backup (i.e. removing an incomplete file) - the backup fails.

The user DOES have full access to the file path (tested manually via SFTP, put/get/rm all good), so not sure why Duplicati can put a file there, but cannot delete the same file.

The initial reason:

Feb 15, 2018 9:39 AM: Message
removing incomplete remote file listed as Uploading: duplicati-bebec4d966256405487311874750625e6.dblock.zip

Followed by the error:

Feb 15, 2018 9:40 AM: Retry
Operation Delete with file duplicati-bebec4d966256405487311874750625e6.dblock.zip attempt 1 of 5 failed with message: Permission denied
Renci.SshNet.Common.SftpPermissionDeniedException: Permission denied
   at Renci.SshNet.Sftp.SftpSession.RequestRemove(String path)
   at Duplicati.Library.Backend.SSHv2.Delete(String remotename)
   at Duplicati.Library.Main.BackendManager.DoDelete(FileEntryItem item)
   at Duplicati.Library.Main.BackendManager.ThreadRun()

Not sure if a path is being mangled when deleting?

File listing for completeness:

-rwxrwxr-x  1 jamie  jamie  30185358 Feb 15 05:49 duplicati-bebec4d966256405487311874750625e6.dblock.zip

Currently running Duplicati - 2.0.2.19_canary_2018-02-12, however this happens on 2.0.2.1 as well. I upgraded for the Smart Retention, and in hopes this SSH/SFTP issue was fixed (it was not).

Thanks…
– Jamie

Hi @jhermans, welcome to the forum!

The initial message says it’s removing the file because it’s incomplete. I’m wondering if whatever caused that incomplete status is also causing this permission issue. More specifically, does something else have that file open / in-use (such as an anti-virus scanner)?

The file list you provided indeed shows all the right permissions (assuming Duplicati is connecting as jamie). When you test manually via SFTP can you rename the file? If not, that would suggest the issue is external to Duplicati.

Just to follow-up… I’m not sure if it was time, the latest builds, or change in sun-spots - but I have not experienced this error message again in the past few weeks.

scratches head

Hooray for sun-spots? :thinking: :wink: