OCM share not working with Nextcloud

Hi there,

after OCM is now working between two seafile 9.0.7 instances, I also want to share files with a Nextcloud (24.0.4) server. This is not working.

According to Seafile Release Table this should be working with 9.0 (“Support Open Cloud Mesh with other cloud products”) but I believe this is not the case.

In seahub/seahub/ocm/settings.py I find:

SUPPORTED_OCM_PROTOCOLS = (
OCM_SEAFILE_PROTOCOL,
)

which leads me to believe that sharing with other products is not supported at the moment.

Can anyone tell me what the current status of OCM share with other products is/should be?

Thank you!

In 9.0 version, sharing from NextCloud to Seafile should work. But sharing from Seafile to NextCloud doesn’t work yet. We plan to add the support in version 10.

1 Like

Sharing from Nextcloud to Seafile does not work for me. I try to share with $EMAILADDR@$SEAFILESERVER (with EMAILADDR=$USER@$DOAMIN, the one I use to login to seafile), but this is not possible.

apache2.log:

a.b.c.d - - [22/Aug/2022:12:04:58 +0200] “GET /ocm-provider/ HTTP/1.1” 200 5872 “-” “Nextcloud Server Crawler”
a.b.c.d - - [22/Aug/2022:12:04:58 +0200] “POST /api/v2.1/ocm//shares HTTP/1.1” 301 5692 “-” “Nextcloud Server Crawler”
a.b.c.d - - [22/Aug/2022:12:04:58 +0200] “GET /api/v2.1/ocm/shares/ HTTP/1.1” 405 452 “-” “Nextcloud Server Crawler”
a.b.c.d - - [22/Aug/2022:12:04:58 +0200] “POST /ocs/v2.php/cloud/shares?format=json HTTP/1.1” 404 14158 “-” “Nextcloud Server Crawler”

seahub.log:

2022-08-22 12:04:58,698 [WARNING] django.request:224 log_response Method Not Allowed: /api/v2.1/ocm/shares/
2022-08-22 12:04:58,772 [WARNING] django.request:224 log_response Not Found: /ocs/v2.php/cloud/shares

Hello, please enable ENABLE_OCM_VIA_WEBDAV

https://manual.seafile.com/deploy/ocm/#sharing-from-nextcloud-to-seafile

2 Likes

Thank you, that does the trick!

One thing I noticed is that I have now two lines “Shared from other servers” in my web gui. One is the share from the other Seafile server and one is the new share from the Nextcloud server.

Have you enabled ENABLE_OCM and ENABLE_OCM_VIA_WEBDAV at the same time?

If NOT, maybe you can try clearing your browser’s cache and test again.

Sorry to bump this from a dozen years ago - I have the OCM changes made in seahub_settings.py BUT what on earth am I supposed to do in Nextcloud? I added appropriate lines, above, but not seeing anything under the “shared from other servers” portion in seafile. What do I need to do nextcloud side? I have been googling for hours now and at a total loss as to why once doing above I see nothing from nextcloud. SOS?

My seafile server is: $SERVER
My seafile user logs in with the email address $EMAILADDR (with $EMAILADDR == $USERNAME@$DOMAIN)

When OCM is activated you can now share from Nextcloud to

$EMAILADDR@$SERVER (== $USERNAME@$DOMAIN@SERVER)

If this is successful you have a new entry under files: “Shared from other servers”

HTH!

The ( ) all confuse me. In Nextcloud am I supposed to do anything with federated cloud id?

So in Nextcloud I need to SHARE TO myemail@emaildomain.org@seafileserver.domain

Then what do I do with the (== $USERNAME@$DOMAIN@SERVER)

Sorry, just super confused still, really, to be honest.

correct

Sorry, this was just to show you, that the “address” you share with can have two “@”.

This is horrendously overly complicated. I have NC showing it’s being shared but still nothing showing up in the appropriate tab in Seafile. I guess this is just beyond me; meh :frowning:

I’m sorry but Seafile still cannot access shares from NextCloud as of version 11. There were some problem accessing NextCloud with webdav. We’re not familiar with PHP and NextCloud. We’ll try to have it solved.

Makes me feel better knowing it wasn’t just me LOL.

Thank you!