From 1d0ca1cd56ac7624e11964eddf32285f0f158eef Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Duffeck?= Date: Tue, 10 Sep 2024 15:41:14 +0200 Subject: [PATCH] Refuse to run on a non-shared or noop id cache Fixes https://github.com/owncloud/ocis/issues/9909 --- pkg/storage/fs/posix/posix.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/pkg/storage/fs/posix/posix.go b/pkg/storage/fs/posix/posix.go index d12f203a22..537689d459 100644 --- a/pkg/storage/fs/posix/posix.go +++ b/pkg/storage/fs/posix/posix.go @@ -97,6 +97,11 @@ func New(m map[string]interface{}, stream events.Stream) (storage.FS, error) { return nil, err } + switch o.IDCache.Store { + case "", "memory", "noop": + return nil, fmt.Errorf("the posix driver requires a shared id cache, e.g. nats-js-kv or redis") + } + tp, err := tree.New(lu, bs, um, trashbin, o, stream, store.Create( store.Store(o.IDCache.Store), store.TTL(o.IDCache.TTL),