You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Server2server - adding shared files/folder to your owncloud doesn't work #9786
I have issue with server2server files/folders sharing + adding
I know that there is reported similar issues before, like #9125, but I couln't find solution for me and I have log entries that I haven't find elsewhere
Steps to reproduce
Install owncloud 7.0 RC3 + nginx + php5-fpm + mysql (I have 2 identical servers)
Login web interface + add New folder or File (first server)
Share folder or file with link
Open link in new browser + click button "Add to your ownCloud" + give URL to my ownCloud (second server)
Answer "Add remote share" to confirmation
Expected behaviour
Shared file/folder gets added to my ownCloud
Actual behaviour
Browser just gives error message
"Couldn't add remote share"
ownCloud log (data/owncloud.log)
Server (my owncloud, second server) has one log entry {"reqId":"53cf6c3538127","app":"PHP","message":"Undefined offset: 1 at \/var\/www\/owncloud\/apps\/files_sharing\/lib\/external\/storage.php#52","level":3,"time":"2014-07-23T08:03:01+00:00","method":"POST","url":"\/index.php\/apps\/files_sharing\/external"}
This log entry is same for adding file and folder.
Server configuration
Both servers: Debian 7.5 + nginx + php5-fpm (5.4.4-14+deb7u12) + MySQL + ownCloud 7.0 RC 3
I have fresh owncloud install (both servers), so nothing has been added through apps.
To config.php I added only
'loglevel' => '0',
I have tested in 2 modes: no encryption and encryption enabled mode - both cases, same message.
The ownCloud is installed directly at root, but 9789.patch didn't help - browser error "Couldn't add remote share" remains but now owncloud.log doesn't log any messages. Tested both file and folders. Should I install and test with 7.0.0? Update: I tested it with 7.0.0 and still doesn't work (used the same patch)
I tested it with latest, 7.0.1-0 version (both servers) and still get browser feedback
"Couldn't add remote share"
Only log entry I get is webserer log entry (after I have inserted the password and clicked button "Add remote share")
mod_rewrite is required in certain apache configurations (non mod_php iirc) to make the authentication headers working.
Besides that rewrites are not required.
Can you test if the server (that the share is added to) can talk to remote server (where the files are stores) in general trough the provided (i.e. wget remote-server.com/owncloud)
@simsasaile sorry, I just re-read you message. I think it was a misunderstanding from my side. I thought that you use apache without mod_rewrite. Now I realized that you use nginx and just pointed out that you got the same error with apache and without mod_rewrite.
the server can talk to the remote server, but when I do wget remote-server.com
(of course I replaced remote-server.com with the actual server name)
I get a certificate warning (it's a self signed certificate)
could that be the problem?
GnuTLS: A TLS warning alert has been received.
GnuTLS: received alert [112]: The server name sent was not recognized
ERROR: The certificate of ‘remote-server.com’ is not trusted.
ERROR: The certificate of ‘remote-server.com’ hasn't got a known issuer.
@icewind1991 you can already import the root certificate you want to trust in the personal settings for the external storage app. For external storage mounts this already works for webdav, so maybe we just need to move the setting out of the external storage app now that the webdav client was moved to core? If the root certificate is uploaded it should also work for the server-to-server share.
My feedback to this issue is .. this still isn't working.
Maybe this is because I use nginx or because I don't correctly use certificates (I imported our Sub CA certificate).
I checked the documentation and there is nothing said about how to use self-signed certificates and nothing new added about nginx.
I updated owncloud version and also patched oC with 10420.
I use ownCloud 7.0.3 on Ubuntu with nginx and after adding self signed certificate of another server I was able to successfully add a share from that remote server.
It also worked with accessing shared files and remote folders (external storage) on OwnCloud 8.0beta2 from OwnCloud 7.0.2.
Ie. request going something like "OC-7.0.2 -> OC-8.0beta2/sharedfolder" and "OC-7.0.2 -> OC-8.0beta2/folder". If you know what I mean :)
Activity
icewind1991 commentedon Jul 23, 2014
Is ownCloud installed directly at the server root? ('example.com' ipv 'example.com/owncloud')
If so, can you test #9789
kalletabur commentedon Jul 23, 2014
The ownCloud is installed directly at root, but 9789.patch didn't help - browser error "Couldn't add remote share" remains but now owncloud.log doesn't log any messages. Tested both file and folders. Should I install and test with 7.0.0?
Update: I tested it with 7.0.0 and still doesn't work (used the same patch)
simsasaile commentedon Jul 27, 2014
I have the same behavior with own cloud 7.0.0 running on nginx. I used the configuration for nginx provided here: http://doc.owncloud.org/server/7.0/admin_manual/installation/installation_source.html#nginx-configuration
kalletabur commentedon Aug 5, 2014
I tested it with latest, 7.0.1-0 version (both servers) and still get browser feedback
"Couldn't add remote share"
Only log entry I get is webserer log entry (after I have inserted the password and clicked button "Add remote share")
kalletabur commentedon Aug 6, 2014
I tested it with Apache and got same message "Couldn't add remote share" when mod_rewrite wasn't enabled.
PS. I didn't mention that my data directory isn't inside /var/www/owncloud but in /var/ocdata
karlitschek commentedon Aug 6, 2014
@icewind1991 @schiesbn Can you have a look please?
schiessle commentedon Aug 12, 2014
mod_rewrite needs to be enabled in order to work correctly.
simsasaile commentedon Aug 12, 2014
Hi Björn,
as far as I know mod_rewrite effects only apache, but what then we use nginx? The config provided here: http://doc.owncloud.org/server/7.0/admin_manual/installation/installation_source.html#nginx-configuration includes some rewrite rules, but maybe not enough?
Because server2server-sync is not working although I installed it following the onwcloud 7 admin manual.
icewind1991 commentedon Aug 12, 2014
mod_rewrite is required in certain apache configurations (non mod_php iirc) to make the authentication headers working.
Besides that rewrites are not required.
Can you test if the server (that the share is added to) can talk to remote server (where the files are stores) in general trough the provided (i.e.
wget remote-server.com/owncloud)schiessle commentedon Aug 12, 2014
@simsasaile sorry, I just re-read you message. I think it was a misunderstanding from my side. I thought that you use apache without mod_rewrite. Now I realized that you use nginx and just pointed out that you got the same error with apache and without mod_rewrite.
simsasaile commentedon Aug 12, 2014
Thanks for the reply,
the server can talk to the remote server, but when I do
wget remote-server.com(of course I replaced remote-server.com with the actual server name)
I get a certificate warning (it's a self signed certificate)
could that be the problem?
icewind1991 commentedon Aug 13, 2014
Yes, that's probably the issue, self-signed certificates are currently not supported for server-server sharing
simsasaile commentedon Aug 13, 2014
Oh that's a bad news, I think many, maybe even most people deploy owncloud with self signed certificates. Will it be supported in the future?
icewind1991 commentedon Aug 13, 2014
It's planned
schiessle commentedon Aug 14, 2014
@icewind1991 you can already import the root certificate you want to trust in the personal settings for the external storage app. For external storage mounts this already works for webdav, so maybe we just need to move the setting out of the external storage app now that the webdav client was moved to core? If the root certificate is uploaded it should also work for the server-to-server share.
PVince81 commentedon Sep 5, 2014
Fixed by #10420
kalletabur commentedon Sep 17, 2014
My feedback to this issue is .. this still isn't working.
Maybe this is because I use nginx or because I don't correctly use certificates (I imported our Sub CA certificate).
I checked the documentation and there is nothing said about how to use self-signed certificates and nothing new added about nginx.
I updated owncloud version and also patched oC with 10420.
pmalek commentedon Nov 19, 2014
I use ownCloud 7.0.3 on Ubuntu with nginx and after adding self signed certificate of another server I was able to successfully add a share from that remote server.
kalletabur commentedon Nov 21, 2014
Thanks for letting know, I'll test the 7.0.3
mjmunger commentedon Jan 14, 2015
If you're deploying this with self-signed certs, you need to also run your own CA and distribute the CA certificates within your organization. Tutorial here: http://learnlinuxonline.com/servers/openssl-generate-certificates-csrs-self-signed-ca-certificates
atroxix commentedon Feb 2, 2015
It also worked with accessing shared files and remote folders (external storage) on OwnCloud 8.0beta2 from OwnCloud 7.0.2.
Ie. request going something like "OC-7.0.2 -> OC-8.0beta2/sharedfolder" and "OC-7.0.2 -> OC-8.0beta2/folder". If you know what I mean :)