Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot mount remote share (server to server sharing) #11413

Closed
jnfrmarks opened this issue Oct 3, 2014 · 16 comments
Closed

Cannot mount remote share (server to server sharing) #11413

jnfrmarks opened this issue Oct 3, 2014 · 16 comments

Comments

@jnfrmarks
Copy link

Steps to reproduce

  1. Upload file
  2. Share file via link
  3. Copy and paste link into browser
  4. Share link via "Add To your ownCloud" text box by entering http::///owncloud

Expected behaviour

The link/file can be shared

Actual behaviour

User gets a "Couldn't add remote share" error

Server configuration

Operating system:

Ubuntu 14

Web server:

Apache/2.2.22

Database:

MySql

PHP version:

PHP 5.5

ownCloud version: (see ownCloud admin page)

ownCloud Enterprise Edition 7 Beta2 (testing)

Updated from an older ownCloud or fresh install:

fresh install

List of activated apps:

List from system creating link (ubuntu 14):

Enabled:

  • activity
  • enterprise_key
  • files
  • files_locking
  • files_sharing
  • files_texteditor
  • files_trashbin
  • files_versions
  • firewall
  • provisioning_api
  • templateeditor
    Disabled:
  • admin_audit
  • external
  • files_antivirus
  • files_encryption
  • files_external
  • files_ldap_home
  • files_sharing_log
  • firstrunwizard
  • sharepoint
  • user_external
  • user_ldap
  • user_shibboleth
  • user_webdavauth

List from system creating share (ubuntu 12):

Enabled:

  • activity
  • enterprise_key
  • files
  • files_locking
  • files_sharing
  • files_texteditor
  • files_trashbin
  • files_versions
  • firewall
  • firstrunwizard
  • sharepoint
  • templateeditor
  • user_ldap
  • windows_network_drive
    Disabled:
  • admin_audit
  • external
  • files_antivirus
  • files_encryption
  • files_external
  • files_ldap_home
  • files_sharing_log
  • provisioning_api
  • user_external
  • user_shibboleth
  • user_webdavauth

Are you using external storage, if yes which one: local/smb/sftp/...

yes, S3

Are you using encryption: yes/no

no

Client configuration

Browser:

Chrome and firefox

Operating system:

windows

Logs

ownCloud log (data/owncloud.log)

From system creating link:

{"reqId":"542eeab74423f","app":"user_ldap","message":"No group filter is specified, LDAP group feature will not be used.","level":1,"time":"2014-10-03T18:28:07+00:00","method":"PROPFIND","url":"\/owncloud\/public.php\/webdav\/"}
{"reqId":"542eeab74423f","app":"webdav","message":"Sabre\\DAV\\Exception\\NotAuthenticated: No basic authentication headers were found","level":0,"time":"2014-10-03T18:28:07+00:00","method":"PROPFIND","url":"\/owncloud\/public.php\/webdav\/"}
{"reqId":"542eeab74423f","app":"PHP","message":"Module 'libsmbclient' already loaded at Unknown#0","level":3,"time":"2014-10-03T18:28:07+00:00","method":"PROPFIND","url":"\/owncloud\/public.php\/webdav\/"}
{"reqId":"542eeab757bff","app":"user_ldap","message":"No group filter is specified, LDAP group feature will not be used.","level":1,"time":"2014-10-03T18:28:07+00:00","method":"PROPFIND","url":"\/owncloud\/public.php\/webdav\/"}
{"reqId":"542eeab757bff","app":"webdav","message":"Sabre\\DAV\\Exception\\NotAuthenticated: No basic authentication headers were found","level":0,"time":"2014-10-03T18:28:07+00:00","method":"PROPFIND","url":"\/owncloud\/public.php\/webdav\/"}

There's nothing in the log from the system creating the share:

@craigpg craigpg added this to the 2014-sprint-05-current milestone Oct 3, 2014
@schiessle
Copy link
Contributor

I can't reproduce it. The last time I saw this errror message was because mod_rewrite wasn't enabled. Can you double check that this module is enabled on your server?

If it is disabled or if you are not sure you can enable it with "a2enmod rewrite" and then restart your apache.

Another thing which could be related it the webdav error. Please check if webdav works correctly? First make sure that you are no longer logged in and then open this URL in your browser:

<username>:<password>@<url_to_your_owncloud>/remote.php/webdav

If webdav works correctly you should now see a listing of the files from "username".

@jnfrmarks
Copy link
Author

@schiesbn

I validated that rewrite was enabled on both ubuntu boxes.

I validated that I can access the ubuntu-14 box successfully via the browser

I cannot though access the ubuntu-12 box successfully. In fact, when I configure a webdav external storage mount point, the mount is successfully created.

p148

When I go the files page, the log file gets filled with

{"reqId":"5432bbe198349","app":"webdav","message":"Sabre\\DAV\\Exception\\NotAuthenticated: No basic authentication headers were found","level":0,"time":"2014-10-06T15:57:21+00:00","method":"PROPFIND","url":"\/owncloud\/remote.php\/webdav\/\/"}

with an occasional thrown in (I had windows network drive and sharepoint configured though I disabled them when trying to diagnose what's going on here)

{"reqId":"5432bbdabd4e2","app":"PHP","message":"Module 'libsmbclient' already loaded at Unknown#0","level":3,"time":"2014-10-06T15:57:14+00:00","method":"PROPFIND","url":"\/owncloud\/remote.php\/webdav\/\/"}

@jnfrmarks
Copy link
Author

@schiesbn

This may be a dup of #11433

@PVince81
Copy link
Contributor

PVince81 commented Oct 8, 2014

I don't think it's a duplicate, the code paths are not the same.

The error {"reqId":"5432bbe198349","app":"webdav","message":"Sabre\\DAV\\Exception\\NotAuthenticated: No basic authentication headers were found","level":0,"time":"2014-10-06T15:57:21+00:00","method":"PROPFIND","url":"\/owncloud\/remote.php\/webdav\/\/"} is the one that is usually caused by the missing mod_rewrite.

Is the setup from Ubuntu 14 and Ubuntu 12 the same ? Are these the Ubuntu versions ? If I remember well Ubuntu 12 has an older PHP version, maybe it's related.

If the connection over WebDAV work on ext storage, it should work for server to server sharing as it uses the same mechanism.

Strange. Needs further research.

@PVince81 PVince81 assigned PVince81 and unassigned schiessle Oct 8, 2014
@PVince81
Copy link
Contributor

PVince81 commented Oct 8, 2014

I managed to reproduce it only once... but it might have been a network connectivity issue.
The other times I was able to add it.

@jnfrmarks Are you able to reproduce the issue consistently ?
You said that mounting with WebDAV worked and the screenshot shows an IP address.
Did you also use the same IP address / URL in the "Add to my ownCloud" field ? Did that address also appear properly in the confirmation dialog ? (just to rule out host name resolution issues)

@PVince81
Copy link
Contributor

PVince81 commented Oct 8, 2014

Another try:

I have setup two virtual machines: Ubuntu 14.04.1 and a target VM Ubuntu 12.04.
I'm able to properly mount Ubuntu 12's shared folder inside of Ubuntu 14 using server to server sharing. It works every time, even when mounting by name.

Note that I had to install php5-curl and enable mod_rewrite to make it work, but I assume that you already have it else we'd see errors in the log.

Can you check the logs from both VMs ?

@PVince81 PVince81 changed the title Can't get files_sharing to work Cannot mount remote share (server to server sharing) Oct 8, 2014
@jnfrmarks
Copy link
Author

@PVince81 Yes, I can reproduce this. I took the ubuntu 12 box out of the mix and am now creating the link from a rhel 6 box and sharing with ubuntu 14. I'm still going through the system configurations to make sure they are all correct.

@craigpg craigpg modified the milestones: 2014-sprint-06-current, 2014-sprint-05 Oct 12, 2014
@PVince81
Copy link
Contributor

@jnfrmarks any update on the setups?

@craigpg craigpg assigned jnfrmarks and unassigned PVince81 Oct 15, 2014
@jnfrmarks
Copy link
Author

@PVince81 I believe both configurations were valid. I'm double checking now.

@jnfrmarks
Copy link
Author

@PVince81 @schiesbn @craigpg

Here's what I found:

There are three boxes I'm playing with: ubuntu-12, ubuntu-14, and rhel over SSL

I can successfully share between the two ubuntu boxes. Even though I had enabled rewrite I still needed to go into the config file and make sure that AllowOverride was set to All.

When I try to share between the rhel box and either of the ubuntu boxes, I get the "Couldn't add remote share" error from the box I'm sharing with (ie, the ubuntu box). I confirmed that AllowOverride is set to All in httpd.conf.

I can access the rhel box via webdav as long as I don't include the credentials in the URL/

Where does this leave us:

The original problem was definitely user error (configuration problem)

I'm not sure though about the issue going over SSL. What can I look at there?

@PVince81
Copy link
Contributor

@icewind1991 @LukasReschke any idea ?

This still sounds like a setup issue.
Are there any logs related to the SSL connection issue ?

@PVince81
Copy link
Contributor

Are they self signed certificates ?
I believe that @icewind1991 has added a new UI to be able to import such certificates.

@jnfrmarks
Copy link
Author

yes; they are self signed certs and there isn't anything in the logs re: ssl connection issue - at least I didn't see anything when I ran the test.

@PVince81
Copy link
Contributor

Did you import the self signed certs ? See #9786

I found this PR #10420 that says it makes it work on master, but it's a huge PR (not to be backported) and there was no mention of any workaround for OC 7.

@icewind1991
Copy link
Contributor

See #11613

@PVince81 PVince81 assigned icewind1991 and unassigned jnfrmarks Oct 16, 2014
@LukasReschke
Copy link
Member

Fixed by #11613

@lock lock bot locked as resolved and limited conversation to collaborators Aug 15, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

6 participants