Skip to content

9.1.1 - Windows webclient (WebDAV) service not starting when connecting over HTTPS #26350

Closed

Description

@AndrinS

Steps to reproduce

  1. Install an SSL Certificate and enable it in your apache2 configuration
  2. Try to connect with Windows after a fresh reboot with no other active network shares (or stop the webclient service manually) with HTTPS

Optional:
Use the official ownCloud virtual machine image (e.g http://download.owncloud.org/community/production/vm/Ubuntu_14.04-owncloud-9.1.1-1.1-201609201317.qcow2.zip)

Expected behaviour

The WebClient service should start as usual (9.0.5 and below) and it should promt for the credentials.

Actual behaviour

The WebClient service won't start and the connection fails. (0x80070043 The Network Name Cannot Be Found)

Server configuration

Operating system: Ubuntu 14.04.5 LTS 64bit
Web server: Apache/2.4.7
Database: MySQL Ver 14.14 Distrib 5.5.52
PHP version: PHP 5.5.9-1ubuntu4.20
ownCloud version: 9.1.1.3
Updated from an older ownCloud or fresh install: fresh install
Where did you install ownCloud from: http://download.owncloud.org/community/production/vm/Ubuntu_14.04-owncloud-9.1.1-1.1-201609201317.qcow2.zip
Signing status (ownCloud 9.0 and above): ?

https://domain.com/owncloud/index.php/settings/integrity/failed: No errors have been found.

List of activated apps:

  • activity: 2.3.2
  • comments: 0.3.0
  • dav: 0.2.6
  • federatedfilesharing: 0.3.0
  • federation: 0.1.0
  • files: 1.5.1
  • files_pdfviewer: 0.8.1
  • files_sharing: 0.10.0
  • files_texteditor: 2.1
  • files_trashbin: 0.9.0
  • files_versions: 1.3.0
  • files_videoplayer: 0.9.8
  • firstrunwizard: 1.1
  • gallery: 15.0.0
  • notifications: 0.3.0
  • provisioning_api: 0.5.0
  • systemtags: 0.3.0
  • templateeditor: 0.1
  • updatenotification: 0.2.1

The content of config/config.php:

{
    "system": {
        "updatechecker": false,
        "instanceid": "oc5w5e2e3e0i",
        "trusted_domains": [
            "localhost"
        ],
        "passwordsalt": "***REMOVED SENSITIVE VALUE***",
        "secret": "***REMOVED SENSITIVE VALUE***",
        "datadirectory": "\/var\/www\/owncloud\/data",
        "overwrite.cli.url": "http:\/\/localhost\/owncloud",
        "dbtype": "mysql",
        "version": "9.1.1.3",
        "dbname": "oc",
        "dbhost": "localhost",
        "dbtableprefix": "oc_",
        "dbuser": "***REMOVED SENSITIVE VALUE***",
        "dbpassword": "***REMOVED SENSITIVE VALUE***",
        "logtimezone": "UTC",
        "installed": true,
        "memcache.local": "\\OC\\Memcache\\APCu",
        "maintenance": false
    }
}

The content of config/config.php: Its basically the by default generated config from the installer

    <VirtualHost *:443>
    ServerName ***REMOVED SENSITIVE VALUE***
    Header add Strict-Transport-Security: "max-age=15768000;includeSubdomains" 
    SSLEngine on

    ### SETTINGS ###    

    DocumentRoot /var/www/owncloud
    <Directory /var/www/owncloud>
    Options Indexes FollowSymLinks
    AllowOverride All
    Require all granted
    </Directory>

    ### LOCATION OF CERT FILES ### 

    SSLCertificateFile ***REMOVED SENSITIVE VALUE***.crt
    SSLCertificateKeyFile ***REMOVED SENSITIVE VALUE***.key

    ErrorLog /var/log/oc/error.log
    CustomLog /var/log/oc/access.log combined

    </VirtualHost>

Are you using external storage: no

Are you using encryption: no

Are you using an external user-backend, if yes which one: no

Client configuration

Browser: Used default Windows (File) Explorer (not IE) to add a new network share

Operating system:
Windows 7 64 bit SP1

Logs

Web server error log

**access.log:**
192.168.166.162 - - [12/Oct/2016:09:30:00 +0200] "OPTIONS / HTTP/1.1" 302 3043 "-" "DavClnt"
192.168.166.162 - - [12/Oct/2016:09:30:00 +0200] "OPTIONS /index.php/login HTTP/1.1" 405 869 "-" "DavClnt"
192.168.166.162 - - [12/Oct/2016:09:30:00 +0200] "OPTIONS / HTTP/1.1" 302 1173 "-" "DavClnt"
192.168.166.162 - - [12/Oct/2016:09:30:00 +0200] "OPTIONS /index.php/login HTTP/1.1" 405 869 "-" "DavClnt"

ownCloud log (data/owncloud.log)

No information

Browser log

No information

Workarround

When the WebClient Service is started manually everything works fine. Other WebDAV clients also seem to work fine as well.

Connecting without HTTPS also works and starts the WebClient service automatically.

Activity

  1. PVince81 commented on Oct 12, 2016

    @PVince81
    Contributor

    No idea, is this an ownCloud bug ? Is OC returning something that the WebClient service doesn't like when starting automatically ?

  2. PVince81 commented on Oct 12, 2016

    @PVince81
    Contributor

    did it work with previous OC versions ? (just to be sure it's not a regression)

  3. AndrinS commented on Oct 12, 2016

    @AndrinS
    Author

    Yes it did work with previous versions (both HTTP and HTTPS).

  4. added this to the 9.1.2 milestone on Oct 12, 2016
  5. AndrinS commented on Oct 12, 2016

    @AndrinS
    Author

    This seems to fix the issue.

    Added this to the site configuration.

        RewriteEngine On
        RewriteCond %{REQUEST_URI} ^(/)$ [NC]
        RewriteCond %{REQUEST_METHOD} ^(OPTIONS)$
        RewriteRule .* https://%{SERVER_NAME}/owncloud/remote.php/webdav/ [R=301,L]
    
  6. adduxa commented on Oct 12, 2016

    @adduxa

    Yes it did work with previous versions (both HTTP and HTTPS).

    I'm using ownCloud scince version 8.0.2 (March 2015) in HTTPS-only mode and all this time I had this problem.

  7. fossxplorer commented on Oct 12, 2016

    @fossxplorer

    Hmm same here too using oC 8.2!
    Gonna test your fix @AndrinS

  8. AndrinS commented on Oct 13, 2016

    @AndrinS
    Author

    Made a clean install of oC 9.0.5 and it works without the fix

    10.1.28.12 - - [13/Oct/2016:11:17:06 +0200] "OPTIONS / HTTP/1.1" 200 13575 "-" "DavClnt"
    10.1.28.12 - - [13/Oct/2016:11:17:09 +0200] "OPTIONS /owncloud/remote.php/webdav HTTP/1.1" 401 3416 "-" "Microsoft-WebDAV-MiniRedir/6.1.7601"
    ///--> Prompts for credetials
    /// After login:
    10.1.28.12 - - [13/Oct/2016:11:17:20 +0200] "OPTIONS /owncloud/remote.php/webdav HTTP/1.1" 401 3416 "-" "Microsoft-WebDAV-MiniRedir/6.1.7601"
    10.1.28.12 - admin [13/Oct/2016:11:17:21 +0200] "OPTIONS /owncloud/remote.php/webdav HTTP/1.1" 200 1109 "-" "Microsoft-WebDAV-MiniRedir/6.1.7601"
    

    Goin to test this with 9.0 and 8.2

  9. chriseqipe commented on Oct 13, 2016

    @chriseqipe
    Contributor

    I just tested a modified .htaccess and it works with Windows 7.

    <IfModule mod_rewrite.c>
      # owncloud is under / and https!
      RewriteCond %{REQUEST_URI} ^/$ [NC]
      RewriteCond %{REQUEST_METHOD} ^OPTIONS$
      # If using ipv6 HTTP_HOST should be the better choice
      RewriteRule .* https://%{HTTP_HOST}/remote.php/webdav/ [R=301,L]
    </IfModule>
    
  10. wioxjk commented on Oct 18, 2016

    @wioxjk

    What kind of certificate are you using?

  11. chriseqipe commented on Oct 18, 2016

    @chriseqipe
    Contributor
  12. 12 remaining items

  13. gassan commented on Mar 21, 2017

    @gassan

    why not mach simpler?

    RewriteEngine On
    RewriteCond %{HTTP_USER_AGENT} ^(DavClnt)$
    RewriteCond %{REQUEST_METHOD} ^(OPTIONS)$
    RewriteRule .* "-" [R=401,L]

  14. adduxa commented on Mar 21, 2017

    @adduxa

    Already did: owncloud-archive/documentation#2668
    TL;DR: It will not work for subdir installations + affects small ammount of Windows users
    I provided fix in documentation: owncloud-archive/documentation#2717

  15. adduxa commented on Mar 21, 2017

    @adduxa

    @kdslkdsaldsal I agree, but PR was closed

  16. gassan commented on Mar 21, 2017

    @gassan

    3 lines are enough too

    RewriteEngine On
    RewriteCond %{HTTP_USER_AGENT} ^(DavClnt)$
    RewriteRule .* "-" [R=401,L]

    But user have to type password two times.

    It would be good to find right response code, which would kick off Windows "DavClnt"

    P.S. It must work with subdir installations too

  17. adduxa commented on Mar 21, 2017

    @adduxa

    @kdslkdsaldsal Hmm, oh that's right... Because it turned out that this is more Windows bug, then ownCloud.
    Yes, I know about .htaccess, I just use nginx and provided a fix for what I know better.

  18. gassan commented on Mar 21, 2017

    @gassan

    One more interesting thing. After reboot wenn Windows beginns negotioaion with Apache's own WebDav Server (permanently mounted network drive), it begins with "right" "Microsoft-WebDav-MiniRedir" Client. How Windows know that Apache WebDav Server will not accept "DavClnt"?

  19. lock commented on Jul 30, 2019

    @lock

    This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

  20. locked as resolved and limited conversation to collaborators on Jul 30, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions