From f226d12a2f26cf1df74c82bee62add4e2fb88e41 Mon Sep 17 00:00:00 2001 From: Nick Craig-Wood Date: Tue, 17 Jun 2025 11:40:42 +0100 Subject: [PATCH] pcloud: fix "Access denied. You do not have permissions to perform this operation" on large uploads The API we use for OpenWriterAt seems to have been disabled at pcloud PUT /file_open?flags=XXX&folderid=XXX&name=XXX HTTP/1.1 gives { "result": 2003, "error": "Access denied. You do not have permissions to perform this operation." } So disable OpenWriterAt and hence multipart uploads for the moment. --- backend/pcloud/pcloud.go | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/backend/pcloud/pcloud.go b/backend/pcloud/pcloud.go index 8c43df9bd..d4962e30f 100644 --- a/backend/pcloud/pcloud.go +++ b/backend/pcloud/pcloud.go @@ -378,12 +378,20 @@ func NewFs(ctx context.Context, name, root string, m configmap.Mapper) (fs.Fs, e return f, nil } -// OpenWriterAt opens with a handle for random access writes +// XOpenWriterAt opens with a handle for random access writes // // Pass in the remote desired and the size if known. // -// It truncates any existing object -func (f *Fs) OpenWriterAt(ctx context.Context, remote string, size int64) (fs.WriterAtCloser, error) { +// It truncates any existing object. +// +// OpenWriterAt disabled because it seems to have been disabled at pcloud +// PUT /file_open?flags=XXX&folderid=XXX&name=XXX HTTP/1.1 +// +// { +// "result": 2003, +// "error": "Access denied. You do not have permissions to perform this operation." +// } +func (f *Fs) XOpenWriterAt(ctx context.Context, remote string, size int64) (fs.WriterAtCloser, error) { client, err := f.newSingleConnClient(ctx) if err != nil { return nil, fmt.Errorf("create client: %w", err)