diff --git a/backend/sftp/sftp.go b/backend/sftp/sftp.go index 9d0a1bcbd..ec98c1719 100644 --- a/backend/sftp/sftp.go +++ b/backend/sftp/sftp.go @@ -1215,7 +1215,7 @@ func (o *Object) Update(ctx context.Context, in io.Reader, src fs.ObjectInfo, op if err != nil { return errors.Wrap(err, "Update") } - file, err := c.sftpClient.Create(o.path()) + file, err := c.sftpClient.OpenFile(o.path(), os.O_WRONLY|os.O_CREATE|os.O_TRUNC) o.fs.putSftpConnection(&c, err) if err != nil { return errors.Wrap(err, "Update Create failed")