Core: Files disappeared after upgrade, but still available under data/

Created on 9 Mar 2016  Â·  23Comments  Â·  Source: owncloud/core

Steps to reproduce

  1. Upgrade from 8.2.1.4 to 9.0 as described in https://doc.owncloud.org/server/9.0/admin_manual/maintenance/manual_upgrade.html

    Expected behavior

Access to old datas.

Actual behavior

No files or directory is showed.

Server configuration

Operating system:
Distributor ID: Debian
Description: Debian GNU/Linux 5.0.8 (lenny)
Release: 5.0.8
Codename: lenny

Web server:
Apache/2.2

Database:
Postresql

PHP version:
5.5.16

ownCloud version: (see ownCloud admin page)
9.0.0.19

Updated from an older ownCloud or fresh install:
Updated from 8.2.1.4

Where did you install ownCloud from:
https://download.owncloud.org/community/owncloud-9.0.0.tar.bz2

No errors have been found.

List of activated apps:

Enabled:
  - comments: 0.2
  - dav: 0.1.5
  - federatedfilesharing: 0.1.0
  - federation: 0.0.4
  - files: 1.4.4
  - files_sharing: 0.9.1
  - files_texteditor: 2.1
  - files_videoplayer: 0.9.8
  - notifications: 0.2.3
  - provisioning_api: 0.4.1
  - systemtags: 0.2
  - templateeditor: 0.1
  - updatenotification: 0.1.0
Disabled:
  - activity
  - encryption
  - external
  - files_external
  - files_pdfviewer
  - files_trashbin
  - files_versions
  - firstrunwizard
  - gallery
  - user_external
  - user_ldap
frafra@ssh:~/pub

The content of config/config.php:

{
    "system": {
        "instanceid": "5210b1d61a47d",
        "passwordsalt": "***REMOVED SENSITIVE VALUE***",
        "datadirectory": "\/home\/frafra\/www\/public\/cloudbox\/owncloud\/data",
        "dbtype": "pgsql",
        "version": "9.0.0.19",
        "dbname": "frafra_owncloud",
        "dbhost": "postgresql1.alwaysdata.com",
        "dbtableprefix": "oc_",
        "dbuser": "***REMOVED SENSITIVE VALUE***",
        "dbpassword": "***REMOVED SENSITIVE VALUE***",
        "installed": true,
        "maxZipInputSize": 536870912,
        "allowZipDownload": true,
        "theme": "",
        "maintenance": false,
        "trusted_domains": [
            "cloud.frafra.eu"
        ],
        "secret": "***REMOVED SENSITIVE VALUE***",
        "forcessl": false,
        "loglevel": 2
    }
}

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

Are you using encryption: yes/no
no

Are you using an external user-backend, if yes which one: LDAP/ActiveDirectory/Webdav/...
no

Client configuration

Browser:
Firefox 44

Logs

Web server error log


ownCloud log (data/owncloud.log)

{"reqId":"do\/3nh0G\/3nkom8D0gNz","remoteAddr":"151.66.60.201","app":"webdav","message":"Exception: {\"Message\":\"HTTP\\\/1.1 400 xmlns:d: 'DAV:' is not a valid URI\\n on line 2, column 20\",\"Exception\":\"Sabre\\\\DAV\\\\Exception\\\\BadRequest\",\"Code\":0,\"Trace\":\"#0 [internal function]: Sabre\\\\DAV\\\\CorePlugin->httpPropFind(Object(Sabre\\\\HTTP\\\\Request), Object(Sabre\\\\HTTP\\\\Response))\\n#1 \\\/home\\\/frafra\\\/www\\\/public\\\/cloudbox\\\/owncloud\\\/3rdparty\\\/sabre\\\/event\\\/lib\\\/EventEmitterTrait.php(105): call_user_func_array(Array, Array)\\n#2 \\\/home\\\/frafra\\\/www\\\/public\\\/cloudbox\\\/owncloud\\\/3rdparty\\\/sabre\\\/dav\\\/lib\\\/DAV\\\/Server.php(459): Sabre\\\\Event\\\\EventEmitter->emit('method:PROPFIND', Array)\\n#3 \\\/home\\\/frafra\\\/www\\\/public\\\/cloudbox\\\/owncloud\\\/3rdparty\\\/sabre\\\/dav\\\/lib\\\/DAV\\\/Server.php(248): Sabre\\\\DAV\\\\Server->invokeMethod(Object(Sabre\\\\HTTP\\\\Request), Object(Sabre\\\\HTTP\\\\Response))\\n#4 \\\/home\\\/frafra\\\/www\\\/public\\\/cloudbox\\\/owncloud\\\/apps\\\/dav\\\/appinfo\\\/v1\\\/webdav.php(55): Sabre\\\\DAV\\\\Server->exec()\\n#5 \\\/home\\\/frafra\\\/www\\\/public\\\/cloudbox\\\/owncloud\\\/remote.php(138): require_once('\\\/home\\\/frafra\\\/ww...')\\n#6 {main}\",\"File\":\"\\\/home\\\/frafra\\\/www\\\/public\\\/cloudbox\\\/owncloud\\\/3rdparty\\\/sabre\\\/dav\\\/lib\\\/DAV\\\/CorePlugin.php\",\"Line\":324,\"User\":\"frafra\"}","level":4,"time":"2016-03-09T18:48:39+00:00"}
Bug files needs info

All 23 comments

Same problem here

Same here. But my error mesage seems to be different:

{"reqId":"VuB7EQoAAAIAAAAUHAwAAAAA","remoteAddr":"10.0.0.1","app":"PHP","message":"Class 'XMLReader' not found at \/data\/www\/cloud\/3rdparty\/sabre\/xml\/lib\/Reader.php#20","level":3,"time":"2016-03-09T19:35:45+00:00"}

Edit: Sorry, my issue seems to be realted to a different issue: https://github.com/owncloud/core/issues/23003

@frafra Can you open your browers console and capture the request to remote.php/webdav when opening the files app?

The request and response would be very interesting. Thanks a lot.

Request payload:

<?xml version="1.0"?>
<d:propfind  xmlns:d="DAV:" xmlns:oc="http://owncloud.org/ns">
  <d:prop>
    <d:getlastmodified />
    <d:getetag />
    <d:getcontenttype />
    <d:resourcetype />
    <oc:fileid />
    <oc:permissions />
    <oc:size />
    <d:getcontentlength />
    <oc:tags />
    <oc:favorite />
    <oc:comments-unread />
    <oc:owner-display-name />
  </d:prop>
</d:propfind>

Response:

<?xml version="1.0" encoding="utf-8"?>
<d:error xmlns:d="DAV:" xmlns:s="http://sabredav.org/ns">
  <s:exception>Sabre\DAV\Exception\BadRequest</s:exception>
  <s:message>xmlns:d: 'DAV:' is not a valid URI
 on line 2, column 20</s:message>
</d:error>

Request method: PROPFIND
Status code: 400 Bad Request

@PVince81 Any idea? That looks kinda bad.

@frafra what version of libxml2 are you running?

@rullzer libxml2 2.6.32 (x86_64)

@frafra mmm ok.
Well if have the feeling this is a system issue somewhere. And something is missing... especially since you are running (even to debian standards :wink:) and ancient release...

Ok looking a bit more. It seems @evert encoutered this in sabre a few times alread see this

So you should upgrade. Feel free to reopen if the propblem persists after upgrading.

i'm getting the same response from /remote.php/webdav/ after upgrading from 8.2.2…

<?xml version="1.0" encoding="utf-8"?>
<d:error xmlns:d="DAV:" xmlns:s="http://sabredav.org/ns">
  <s:exception>Sabre\DAV\Exception\BadRequest</s:exception>
  <s:message>xmlns:d: 'DAV:' is not a valid URI
 on line 2, column 20</s:message>
</d:error>

I'm getting the same error after the upgrade.

I'm on a shared webspace using libxml2. version 2.6.26. Maybe it's really way to old.

I've just contacted my hoster about a migration on a newer server.

2.6.26 is from june 2006. So upgrading is recommended :wink:

Please can you tell me, wich version of libxml2 is minimum for the use with owncloud 9.0.x?

And is there somewhere a document, witch I may give to my hoster, describing the error with libxml2?

I don't know. Somebody needs to go trough the changelog to see when the DAV namespace was added.

The only thing I found about the namespace in releases list is this:

`2.6.19: Apr 02 2005

build fixes: drop .la from RPMs, --with-minimum build fix (William Brack), use XML_SOCKLEN_T instead of SOCKLEN_T because it breaks with AIX 5.3 compiler, fixed elfgcchack.h generation and PLT reduction code on Linux/ELF/gcc4
bug fixes: schemas type decimal fixups (William Brack), xmmlint return code (Gerry Murphy), small schemas fixes (Matthew Burgess and GUY Fabrice), workaround "DAV:" namespace brokeness in c14n (Aleksey Sanin), segfault in Schemas (Kasimier Buchcik), Schemas attribute validation (Kasimier), Prop related functions and xmlNewNodeEatName (Rob Richards), HTML serialization of name attribute on a elements, Python error handlers leaks and improvement (Brent Hendricks), uninitialized variable in encoding code, Relax-NG validation bug, potential crash if gnorableWhitespace is NULL, xmlSAXParseDoc and xmlParseDoc signatures, switched back to assuming UTF-8 in case no encoding is given at serialization time
improvements: lot of work on Schemas by Kasimier Buchcik on facets checking and also mixed handling.
`

But this version is older then mine! :-/

Ah, there is something:

Mon Aug 4 17:27:27 CEST 2008 Daniel Veillard [email protected]

  • uri.c include/libxml/uri.h: rewrite the URI parser to update to
    rfc3986 (from 2396)
  • test/errors/webdav.xml result/errors/webdav.xml*: removed the
    error test, 'DAV:' is a correct URI under 3986
  • Makefile.am: small cleanup in make check

I found this in https://github.com/tenderlove/libxml2/blob/master/ChangeLog

This got into libxml2 version 2.7.0:

2.7.0: Aug 30 2008

Documentation: switch ChangeLog to UTF-8, improve mutithreads and xmlParserCleanup docs
Portability fixes: Older Win32 platforms (Rob Richards), MSVC porting fix (Rob Richards), Mac OS X regression tests (Sven Herzberg), non GNUCC builds (Rob Richards), compilation on Haiku (Andreas Färber)
Bug fixes: various realloc problems (Ashwin), potential double-free (Ashwin), regexp crash, icrash with invalid whitespace facets (Rob Richards), pattern fix when streaming (William Brack), various XML parsing and validation fixes based on the W3C regression tests, reader tree skipping function fix (Ashwin), Schemas regexps escaping fix (Volker Grabsch), handling of entity push errors (Ashwin), fix a slowdown when encoder cant serialize characters on output
Code cleanup: compilation fix without the reader, without the output (Robert Schwebel), python whitespace (Martin), many space/tabs cleanups, serious cleanup of the entity handling code
Improvement: switch parser to XML-1.0 5th edition, add parsing flags for old versions, switch URI parsing to RFC 3986, add xmlSchemaValidCtxtGetParserCtxt (Holger Kaelberer), new hashing functions for dictionnaries (based on Stefan Behnel work), improve handling of misplaced html/head/body in HTML parser, better regression test tools and code coverage display, better algorithms to detect various versions of the billion laughts attacks, make arbitrary parser limits avoidable as a parser option

@larp-welt awesome thanks for looking into that!

@carlaschroder can we update the docs that we need at least libxml2 version 2.7.0?

@PVince81 @DeepDiver1975 We should probabaly add a check to the admin page as well.

master: 417cb860591f7f6fc3a68eaddf16eb5aad0ab939
stable9: 6b5947ba28a076bb0cd826f6576f8edbe644fe98

Awesome thanks!

@frafra Out of curiosity: You're running Debian 5.0 which got the last security updated in February 2012?

@RealRancor that's not my server; this ownCloud instance is running on a shared hosting service. I just filled a ticket.

Ok :-)

Then its really time to switch the hosting provider :-)

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.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

gxgani picture gxgani  Â·  5Comments

PVince81 picture PVince81  Â·  4Comments

emmenlau picture emmenlau  Â·  5Comments

jnweiger picture jnweiger  Â·  4Comments

patrickjahns picture patrickjahns  Â·  4Comments