Collaborative editing not working


I have set up Collabora and it works. Thing is: it does not work with shared documents. I suspect it has something to do with my external storage setup. Every user has a home storage that gets mounted via SFTP using the log-in credentials. (I use a LDAP server, therefore the credentials are the same). When I create a document in the home folder of user1 and share it with user2, user2 can not open the document.

Using the network inspector I found a failing POST request to https://collabora.mydomain.example/browser/eb73aa3/cool.html?WOPISrc=https%3A%2F%2Fcloud.mydomain.example%2Findex.php%2Fapps%2Frichdocuments%2Fwopi%2Ffiles%2F295677_ocikpeb8dqdg&title=test.odt&lang=en-GB&closebutton=1&revisionhistory=1. The normal nextcloud logs show nothing substantial. The following error can be found on the collabora mashine: /usr/bin/coolmount: forced unmount of [/opt/cool/child-roots/biSVMZdHt2q2j5wb/tmp] failed: Permission denied.

Does anybody have an idea how to fix this?

Here is a quick diagram of my infrastructure:
Untitled Diagram.drawio

After lots of messing around I was able to fix the error message, but collaborative editing is still not working. Whenever user1 openes a file user2 cannot open it. He gets stuck on Connecting… 0%. When the user2 openes the file first user1 cannot open it.

When another user connects the editing user gets a message that the other user is now connected. The connecting user can see the other user as an editing user in the toolbar