Trying to resolve "WebDAV interface seems to be broken" issue

Steps to reproduce

  1. update Owncloud from 9.1.8 to 10.0.10

Comment: it’s an old OwnCloud installation previously upgraded from 8 to 9.

Expected behaviour

ownCloud should show file in the web interface and sync clients should start to sync

Actual behaviour

Admin panel shows:

  • Your web server is not yet set up properly to allow file synchronization because the WebDAV interface seems to be broken.

Sync clients show:
No connection to ownCloud. Server replied “403 Forbidden” to “PROPFIND https://OWNCLOUDSERVERADDRESS/remote.php/webdav/

Server configuration

Operating system:
Debian 9.6

Web server::
Apache 2.4.25

Database:
MySQL 5.5.9999

PHP version:
7.2
“Loaded Modules”: “core mod_so mod_watchdog http_core mod_log_config mod_logio mod_version mod_unixd mod_access_compat mod_alias mod_auth_basic mod_authn_core mod_authn_file mod_authz_core mod_authz_groupfile mod_authz_host mod_authz_user mod_autoindex mod_cgi mod_deflate mod_dir mod_env mod_filter mod_headers mod_mime prefork mod_negotiation mod_php7 mod_proxy mod_proxy_html mod_proxy_http mod_reqtimeout mod_rewrite mod_setenvif mod_socache_shmcb mod_ssl mod_status mod_xml2enc”,

ownCloud version:
10.0.10

Updated from an older ownCloud or fresh install:
updated from 9.1.8

Where did you install ownCloud from:
apt repository

Signing status (ownCloud 9.0 and above):

No errors have been found.

ownCloud config:

‘instanceid’ => ‘REMOVED SENSITIVE VALUE’,
‘passwordsalt’ => ‘REMOVED SENSITIVE VALUE’,
‘trusted_domains’ =>
array (
0 => ‘REMOVED SENSITIVE VALUE’,
1 => ‘REMOVED SENSITIVE VALUE’,
),
‘mail_domain’ => ‘REMOVED SENSITIVE VALUE’,
‘mail_smtpdebug’ => false,
‘mail_smtpmode’ => ‘smtp’,
‘mail_smtphost’ => ‘REMOVED SENSITIVE VALUE’,
‘mail_smtpport’ => ‘587’,
‘mail_smtpauth’ => 1,
‘mail_smtpsecure’ => ‘tls’,
‘mail_smtpname’ => ‘REMOVED SENSITIVE VALUE’,
‘mail_smtppassword’ => ‘REMOVED SENSITIVE VALUE’,
‘datadirectory’ => ‘/data/shared’,
‘dbtype’ => ‘mysql’,
‘version’ => ‘10.0.10.4’,
‘installed’ => true,
‘forcessl’ => true,
‘theme’ => ‘’,
‘maintenance’ => false,
‘secret’ => ‘REMOVED SENSITIVE VALUE’,
‘mail_from_address’ => ‘system’,
‘loglevel’ => 2,
‘trashbin_retention_obligation’ => ‘auto’,
‘memcache.local’ => ‘\OC\Memcache\APCu’,
‘filelocking.enabled’ => true,
‘memcache.locking’ => ‘\OC\Memcache\Redis’,
‘redis’ =>
array (
‘host’ => ‘localhost’,
‘port’ => 6379,
‘timeout’ => 0,
‘password’ => ‘’,
),
‘updatechecker’ => false,
‘dbname’ => ‘owncloud’,
‘dbhost’ => ‘localhost’,
‘dbuser’ => ‘oc_mysql_user’,
‘dbpassword’ => ‘REMOVED SENSITIVE VALUE’,
‘debug’ => false,
‘appstore.experimental.enabled’ => true,

List of activated apps:
Enabled:

  • bookmarks: 0.10.5
  • comments: 0.3.0
  • configreport: 0.1.1
  • dav: 0.4.0
  • external: 1.2
  • federatedfilesharing: 0.3.1
  • files: 1.5.1
  • files_external: 0.7.1
  • files_pdfviewer: 0.10.0
  • files_sharing: 0.11.0
  • files_texteditor: 2.3.0
  • files_trashbin: 0.9.1
  • files_versions: 1.3.0
  • files_videoplayer: 0.9.8
  • firstrunwizard: 1.1
  • market: 0.3.0
  • notifications: 0.3.5
  • provisioning_api: 0.5.0
  • systemtags: 0.3.0
  • templateeditor: 0.4.0
  • updatenotification: 0.2.1
    Disabled:
  • activity
  • calendar
  • encryption
  • federation
  • gallery
  • tasks
  • user_external

Are you using external storage, if yes which one:
no

Are you using encryption:
no

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

Logs

Web server error log

[Tue Jan 15 08:04:53.219755 2019] [access_compat:error] [pid 20252] [client REMOVED SENSITIVE VALUE:53501] AH01797: client denied by server configuration: /var/www/owncloud/remote.php
[Tue Jan 15 08:04:53.221708 2019] [access_compat:error] [pid 20351] [client REMOVED SENSITIVE VALUE:53502] AH01797: client denied by server configuration: /var/www/owncloud/remote.php
[Tue Jan 15 08:04:53.628617 2019] [access_compat:error] [pid 20396] [client REMOVED SENSITIVE VALUE:62189] AH01797: client denied by server configuration: /var/www/owncloud/remote.php
[Tue Jan 15 08:04:53.635510 2019] [access_compat:error] [pid 20515] [client REMOVED SENSITIVE VALUE:62190] AH01797: client denied by server configuration: /var/www/owncloud/remote.php
[Tue Jan 15 08:04:57.506813 2019] [access_compat:error] [pid 20602] [client REMOVED SENSITIVE VALUE:50796] AH01797: client denied by server configuration: /var/www/owncloud/remote.php

ownCloud log (data/owncloud.log)

lots of:

“level”:3,“time”:“2019-01-15T06:59:01+00:00”,“remoteAddr”:"",“user”:"–",“app”:“files”,“method”:"–",“url”:"–",“message”:“Exception: {“Exception”:“OC\\ForbiddenException”,“Message”:”",“Code”:0,“Trace”:"#0 \/var\/www\/owncloud\/lib\/private\/Files\/Utils\/Scanner.php(139): OC\\Files\\Utils\\Scanner->shouldScan(Object(OC\\Files\\Mount\\MountPoint))\n#1 \/var\/www\/owncloud\/apps\/files\/lib\/BackgroundJob\/ScanFiles.php(87): OC\\Files\\Utils\\Scanner->backgroundScan(’’)\n#2 \/var\/www\/owncloud\/apps\/files\/lib\/BackgroundJob\/ScanFiles.php(111): OCA\\Files\\BackgroundJob\\ScanFiles->runScanner(Object(OC\\User\\User))\n#3 \/var\/www\/owncloud\/lib\/private\/BackgroundJob\/Job.php(57): OCA\\Files\\BackgroundJob\\ScanFiles->run(NULL)\n#4 \/var\/www\/owncloud\/lib\/private\/BackgroundJob\/TimedJob.php(53): OC\\BackgroundJob\\Job->execute(Object(OC\\BackgroundJob\\JobList), Object(OC\\Log))\n#5 \/var\/www\/owncloud\/cron.php(120): OC\\BackgroundJob\\TimedJob->execute(Object(OC\\BackgroundJob\\JobList), Object(OC\\Log))\n#6 {main}",“File”:"\/var\/www\/owncloud\/lib\/private\/Files\/Utils\/Scanner.php",“Line”:192}"}

Hey,

i did the following search https://central.owncloud.org/search?q=Your%20web%20server%20is%20not%20yet%20set%20up%20properly%20to%20allow" and found quite a lot existing threads and an How to fix CalDAV|CardDAV|WebDAV problems FAQ item.

Seems to me that there is no “all in one” solution :slightly_frowning_face:

1 Like

Hi Tom,

Thanks bunches for your reply. Unfortunately I’ve been up and down that FAQ. By now you could call me a stalker of that page :thinking:

The ownCloud instance is not behind a reverseProxy, Rewrite module is enabled.

There was a separate WebDAV module enabled but I deactivated it.

Loaded Apache modules:

core_module (static)
so_module (static)
watchdog_module (static)
http_module (static)
log_config_module (static)
logio_module (static)
version_module (static)
unixd_module (static)
access_compat_module (shared)
alias_module (shared)
auth_basic_module (shared)
authn_core_module (shared)
authn_file_module (shared)
authz_core_module (shared)
authz_host_module (shared)
authz_user_module (shared)
autoindex_module (shared)
deflate_module (shared)
dir_module (shared)
env_module (shared)
filter_module (shared)
headers_module (shared)
mime_module (shared)
mpm_prefork_module (shared)
negotiation_module (shared)
php7_module (shared)
reqtimeout_module (shared)
rewrite_module (shared)
setenvif_module (shared)
socache_shmcb_module (shared)
ssl_module (shared)
status_module (shared)

My vhost configuration:
owncloud.conf

<VirtualHost *:80>
ServerName REMOVED SENSITIVE VALUE
DocumentRoot /var/www/owncloud

ErrorLog ${APACHE_LOG_DIR}/error-owncloud.log
CustomLog ${APACHE_LOG_DIR}/access-owncloud.log combined

RewriteEngine on
RewriteCond %{SERVER_NAME} =REMOVED SENSITIVE VALUE
RewriteRule ^ https://%{SERVER_NAME}%{REQUEST_URI} [END,NE,R=permanent]
</VirtualHost>

owncloud-ssl.conf

<IfModule mod_ssl.c>
<VirtualHost *:443>
    DocumentRoot /var/www/owncloud
    ServerName REMOVED SENSITIVE VALUE

    Header always add Strict-Transport-Security "max-age=15768000"
    SSLCertificateFile /etc/letsencrypt/live/REMOVED SENSITIVE VALUE/cert.pem
    SSLCertificateKeyFile /etc/letsencrypt/live/REMOVED SENSITIVE VALUE/privkey.pem
    Include /etc/letsencrypt/options-ssl-apache.conf
    SSLCertificateChainFile /etc/letsencrypt/live/REMOVED SENSITIVE VALUE/chain.pem

<Directory /var/www/owncloud/>
Options +FollowSymlinks
AllowOverride All

Satisfy Any

<IfModule mod_dav.c>
Dav off
</IfModule>

SetEnv HOME /var/www/owncloud
SetEnv HTTP_HOME /var/www/owncloud

</Directory>
</VirtualHost>
</IfModule>

Main apache config file:

# This is the main Apache server configuration file.  It contains the
# configuration directives that give the server its instructions.
# See http://httpd.apache.org/docs/2.4/ for detailed information about
# the directives and /usr/share/doc/apache2/README.Debian about Debian specific
# hints.
#
#
# Summary of how the Apache 2 configuration works in Debian:
# The Apache 2 web server configuration in Debian is quite different to
# upstream's suggested way to configure the web server. This is because Debian's
# default Apache2 installation attempts to make adding and removing modules,
# virtual hosts, and extra configuration directives as flexible as possible, in
# order to make automating the changes and administering the server as easy as
# possible.

# It is split into several files forming the configuration hierarchy outlined
# below, all located in the /etc/apache2/ directory:
#
#       /etc/apache2/
#       |-- apache2.conf
#       |       `--  ports.conf
#       |-- mods-enabled
#       |       |-- *.load
#       |       `-- *.conf
#       |-- conf-enabled
#       |       `-- *.conf
#       `-- sites-enabled
#               `-- *.conf
#
#
# * apache2.conf is the main configuration file (this file). It puts the pieces
#   together by including all remaining configuration files when starting up the
#   web server.
#
# * ports.conf is always included from the main configuration file. It is
#   supposed to determine listening ports for incoming connections which can be
#   customized anytime.
#
# * Configuration files in the mods-enabled/, conf-enabled/ and sites-enabled/
#   directories contain particular configuration snippets which manage modules,
#   global configuration fragments, or virtual host configurations,
#   respectively.
#
#   They are activated by symlinking available configuration files from their
#   respective *-available/ counterparts. These should be managed by using our
#   helpers a2enmod/a2dismod, a2ensite/a2dissite and a2enconf/a2disconf. See
#   their respective man pages for detailed information.
#
# * The binary is called apache2. Due to the use of environment variables, in
#   the default configuration, apache2 needs to be started/stopped with
#   /etc/init.d/apache2 or apache2ctl. Calling /usr/bin/apache2 directly will not
#   work with the default configuration.


# Global configuration
#
#

#
# ServerRoot: The top of the directory tree under which the server's
# configuration, error, and log files are kept.
#
# NOTE!  If you intend to place this on an NFS (or otherwise network)
# mounted filesystem then please read the Mutex documentation (available
# at <URL:http://httpd.apache.org/docs/2.4/mod/core.html#mutex>);
# you will save yourself a lot of trouble.
#
# Do NOT add a slash at the end of the directory path.
#
#ServerRoot "/etc/apache2"

#
# The accept serialization lock file MUST BE STORED ON A LOCAL DISK.
#
#Mutex file:${APACHE_LOCK_DIR} default

#
# The directory where shm and other runtime files will be stored.
#

DefaultRuntimeDir ${APACHE_RUN_DIR}

#
# PidFile: The file in which the server should record its process
# identification number when it starts.
# This needs to be set in /etc/apache2/envvars
#
PidFile ${APACHE_PID_FILE}

#
# Timeout: The number of seconds before receives and sends time out.
#
Timeout 300

#
# KeepAlive: Whether or not to allow persistent connections (more than
# one request per connection). Set to "Off" to deactivate.
#
KeepAlive On

#
# MaxKeepAliveRequests: The maximum number of requests to allow
# during a persistent connection. Set to 0 to allow an unlimited amount.
# We recommend you leave this number high, for maximum performance.
#
MaxKeepAliveRequests 100

#
# KeepAliveTimeout: Number of seconds to wait for the next request from the
# same client on the same connection.
#
KeepAliveTimeout 5


# These need to be set in /etc/apache2/envvars
User ${APACHE_RUN_USER}
Group ${APACHE_RUN_GROUP}

#
# HostnameLookups: Log the names of clients or just their IP addresses
# e.g., www.apache.org (on) or 204.62.129.132 (off).
# The default is off because it'd be overall better for the net if people
# had to knowingly turn this feature on, since enabling it means that
# each client request will result in AT LEAST one lookup request to the
# nameserver.
#
HostnameLookups Off

# ErrorLog: The location of the error log file.
# If you do not specify an ErrorLog directive within a <VirtualHost>
# container, error messages relating to that virtual host will be
# logged here.  If you *do* define an error logfile for a <VirtualHost>
# container, that host's errors will be logged there and not here.
#
ErrorLog ${APACHE_LOG_DIR}/error.log

#
# LogLevel: Control the severity of messages logged to the error_log.
# Available values: trace8, ..., trace1, debug, info, notice, warn,
# error, crit, alert, emerg.
# It is also possible to configure the log level for particular modules, e.g.
# "LogLevel info ssl:warn"
#
LogLevel warn

# Include module configuration:
IncludeOptional mods-enabled/*.load
IncludeOptional mods-enabled/*.conf

# Include list of ports to listen on
Include ports.conf


# Sets the default security model of the Apache2 HTTPD server. It does
# not allow access to the root filesystem outside of /usr/share and /var/www.
# The former is used by web applications packaged in Debian,
# the latter may be used for local directories served by the web server. If
# your system is serving content from a sub-directory in /srv you must allow
# access here, or in any related virtual host.
<Directory />
        Options FollowSymLinks
        AllowOverride None
        Require all denied
</Directory>

<Directory /usr/share>
        AllowOverride None
        Require all granted
</Directory>

<Directory /var/www/>
        Options Indexes FollowSymLinks
        AllowOverride None
        Require all granted
</Directory>

<Directory /var/www/owncloud>
 Satisfy Any
</Directory>

#<Directory /srv/>
#       Options Indexes FollowSymLinks
#       AllowOverride None
#       Require all granted
#</Directory>




# AccessFileName: The name of the file to look for in each directory
# for additional configuration directives.  See also the AllowOverride
# directive.
#
AccessFileName .htaccess

#
# The following lines prevent .htaccess and .htpasswd files from being
# viewed by Web clients.
#
<FilesMatch "^\.ht">
        Require all denied
</FilesMatch>


#
# The following directives define some format nicknames for use with
# a CustomLog directive.
#
# These deviate from the Common Log Format definitions in that they use %O
# (the actual bytes sent including headers) instead of %b (the size of the
# requested file), because the latter makes it impossible to detect partial
# requests.
#
# Note that the use of %{X-Forwarded-For}i instead of %h is not recommended.
# Use mod_remoteip instead.
#
LogFormat "%v:%p %h %l %u %t \"%r\" %>s %O \"%{Referer}i\" \"%{User-Agent}i\"" vhost_combined
LogFormat "%h %l %u %t \"%r\" %>s %O \"%{Referer}i\" \"%{User-Agent}i\"" combined
LogFormat "%h %l %u %t \"%r\" %>s %O" common
LogFormat "%{Referer}i -> %U" referer
LogFormat "%{User-agent}i" agent

# Include of directories ignores editors' and dpkg's backup files,
# see README.Debian for details.

# Include generic snippets of statements
IncludeOptional conf-enabled/*.conf

# Include the virtual host configurations:
IncludeOptional sites-enabled/*.conf

# vim: syntax=apache ts=4 sw=4 sts=4 sr noet

I have a second ownCloud instance running and I cannot see ANY difference in the apache configuration nor any installed modules, vhost configuration, .htaccess file config etc.

I’m banging my head against this :disappointed:

It looks like there’s a problem with a previous update but there’s not update.log in the /data/ folder or in /updater-data/.
I did a “upgrade:checkpoint --list” and turns out there are not checkpoints. So reverting back is also not an option.
I don’t think it’s related to my problem though. It’s a known issue apparently: https://github.com/owncloud/updater/issues/482

Hey,

i thinkn the main issue is probably this:

From what i know the access via WebDAV is done via the remote.php, if your Apache web server is blocking the access of ownCloud to this endpoint the “WebDAV interface seems to be broken” is probably showing up.

Hi Tom,
Yes I get where you’re coming from but the Apache is for sure configured correctly. I’ve even re-installed the apache and rebuild the config.

That’s also my HUGE issue that I’m having with OwnCloud and the error messages that it produces. It’s fine for simple troubleshooting but when you’re having substantial issues like this the log doesn’t reveal much. In this case it doesn’t even point us into the right direction.

Not so sure about the entire Enterprise aspect of OwnCloud.

I ended up re-building the entire server from scratch and restoring the database from backup. Ergo, we won’t know what caused this.

Oh, just as a note, during the restore I had to delete a table in the MySQL database to finish the installation/update. It was the federation ‘oc_trusted_servers’ table. I got a "SQLSTATE [42S01]: Base table or view already exits: 1050 Table ‘oc_trusted_servers’ already exists.
After deleting that table the update succeeded.