Skip to content

Issues with missing personal files and no access to shared files after upgrading from 6.0.6 to 7.x #12801

Closed

Description

@fleish

Steps to reproduce

  1. upgrade owncloud 6.0.6 using SQLite database to 7.0.3 or 7.0.4 using ubuntu package from http://download.opensuse.org/repositories/isv:/ownCloud:/community:/7.0/xUbuntu_12.04/
  2. run occ upgrade
  3. (optional - issue occurs in either database type) convert from SQLite to MySQL using occ db:convert-type --all-apps mysql owncloud localhost
  4. Login to your owncloud via the web

Expected behaviour

You should be able to see your files & the files that have been shared with you

Actual behaviour

You will not be able to view your files nor any of the files that have been shared with you (for the latter you can see the folders that have been shared with you but you cannot get into them)

NOTE: talked to AnybodyElse on IRC about this and as suggested ran "occ files:scan --all" which fixed the first issue of not being able to see my own files.

Server configuration

Operating system: Ubuntu 12.04.5 LTS

Web server: Apache/2.2.22 (Ubuntu)

Database: SQLite3 or mysql Ver 14.14 Distrib 5.5.40, for debian-linux-gnu (x86_64) using readline 6.2

PHP version: PHP 5.3.10-1ubuntu3.15 with Suhosin-Patch (cli) (built: Oct 29 2014 12:19:04)

ownCloud version: 7.0.4.2

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

List of activated apps:
Activity
Deleted Files
Documents
Encryption
First Run Wizard
Full Text Search
LDAP user and group backend
PDF Viewer
Pictures
Share Files
Text Editor
Video Viewer

The content of config/config.php:

'**REDACTED**', 'passwordsalt' => '**REDACTED**', 'datadirectory' => '/var/www/owncloud/data', 'dbtype' => 'mysql', 'version' => '7.0.4.2', 'installed' => true, 'ldapIgnoreNamingRules' => false, 'forcessl' => true, 'enable_previews' => false, 'theme' => '', 'maintenance' => false, 'trusted_domains' => array ( 0 => '**REDACTED**', ), 'secret' => '**REDACTED**', 'share_folder' => '/Shared', 'dbname' => 'owncloud', 'dbhost' => 'localhost', 'dbuser' => 'owncloud', 'dbpassword' => '**REDACTED**', ); **Are you using external storage, if yes which one:** NO **Are you using encryption:** YES ### Client configuration **Browser:** Google Chrome Version 39.0.2171.71 (64-bit) **Operating system:** Mac OSX 10.8.5 (also tested in Mac OSX 10.9.5) ### Logs #### Web server error log [Thu Dec 11 21:12:27 2014] [error] [client 50.248.219.14] PHP Fatal error: Cannot redeclare class OC_Search_Provider in /var/www/owncloud/lib/private/search/provider.php on line 5, referer: https://somehost.somedomain.org/index.php/apps/files/?dir=%2F #### ownCloud log (data/owncloud.log) messages seen after the upgrade: 1) This one appears repeatedly. I think it corresponds to me trying to view things that have been shared with me by user with UUID yyy-yyy-yyy-yyy (REDACTED): {"app":"files_sharing","message":"Unable to get mount for shared storage '3' user 'yyy-yyy-yyy-yyy'","level":3,"time":"2014-12-11T21:07:31+00:00"} 2) This one appears just once, seems to happen when trying to view shared files. First error No. 1 is repeated twice, then this message appears, then error No. 1 is repeated many more times: {"app":"PHP","message":"Invalid argument supplied for foreach() at \/var\/www\/owncloud\/lib\/private\/files\/cache\/scanner.php#216","level":3,"time":"2014-12-11T21:07:31+00:00"} 3) This one appears a couple of times: {"app":"PHP","message":"Cannot redeclare class OC_Search_Provider at \/var\/www\/owncloud\/lib\/private\/search\/provider.php#5","level":3,"time":"2014-12-11T21:12:27+00:00"} 4) These appeared once in conjunction with me deleting a file on my computer (REDACTED my UUID xxx-xxx-xxx-xxx) and my sync client pushing it to the server. The file was actually deleted, but the messages were logged: {"app":"Encryption library","message":"No share key found for user \"xxx-xxx-xxx-xxx\" for file \"Test222.txt\"","level":2,"time":"2014-12-11T21:11:47+00:00"} {"app":"core","message":"No preview providers exist","level":3,"time":"2014-12-11T21:11:47+00:00"} {"app":"hook","message":"error while running hook (OC\Preview::post_delete_files): No preview providers","level":3,"time":"2014-12-11T21:11:47+00:00"}

Activity

  1. LukasReschke commented on Dec 11, 2014

    @LukasReschke
    Contributor

    @icewind1991 Any idea?

  2. fleish commented on Dec 11, 2014

    @fleish
    Author

    Updated a few things for accuracy & clarity. Uncommented secret in config file. Updated error message No. 2 as I see when it is happening.

  3. MorrisJobke commented on Jan 2, 2015

    @MorrisJobke
    Contributor

    @fleish Is the instance working after the upgrade and before the database migration? (after step 2) Or is it still broken at this point. I ask this to find the cause of your problem (either upgrade code or migration code)

  4. fleish commented on Jan 2, 2015

    @fleish
    Author

    @MorrisJobke sorry if that was unclear, I tried to caveat step #3 to note it happens regardless of the DB migration. I've tried just upgrading the code and leaving the instance on SQLite and the same issue(s) occur

  5. fleish commented on Jan 12, 2015

    @fleish
    Author

    @MorrisJobke or anyone else able to provide some suggestions here? My users are getting restless with daily issues with sqlite locking

  6. MorrisJobke commented on Jan 13, 2015

    @MorrisJobke
    Contributor

    @PVince81 @schiesbn YOu have more experience with the sharing part and maybe can better analyze this one. Thanks

  7. PVince81 commented on Jan 13, 2015

    @PVince81
    Contributor

    @fleish please check your oc_storages table.
    Are there entries with the format "local::$datadir/$user" and also "home::$user" ? (there should be only one per user, not both). Did you move/change/rename the data dir when upgrading ?

  8. fleish commented on Jan 13, 2015

    @fleish
    Author

    @PVince81 checking in oc_storages pre-upgrade I see only 1 local:: entry as follows:
    local::/var/www/owncloud/data/|4

    the rest are like:
    home::admin|1
    home::REDACTED-GUID|2

    EDIT: And there is no home:: entry ending in 4

    I don't change anything manually during the upgrade, only whatever the apt/dpkg upgrade does and then occ upgrade & occ files:scan --all

  9. PVince81 commented on Jan 13, 2015

    @PVince81
    Contributor

    Okay good, so your setup isn't a case of the known "home storage duplication" which is known to make shares disappear.

  10. PVince81 commented on Jan 13, 2015

    @PVince81
    Contributor

    Let's check for orphaned shares:
    select * from oc_share where item_source not in (select fileid from oc_filecache)

    and orphaned storages:
    select * from oc_filecache where storage not in (select numeric_id from oc_storages)

    Also that error 3) about the search provider class is suspicious. Do you somehow happen to have the search app enabled twice from different sources ?

  11. fleish commented on Jan 13, 2015

    @fleish
    Author

    Ophaned shares:

    id|share_with|uid_owner|parent|item_type|item_source|item_target|file_source|file_target|permissions|stime|accepted|expiration|token|mail_send
    19|**REDACTED_GUID1**|**REDACTED_GUID2**||file|1721|/1721|1721|/REDACTED_FILENAME 3.zip.gpg|||0|27|1398283250|0|0
    20|**REDACTED_GUID3**|**REDACTED_GUID2**||file|1721|/1721|1721|/REDACTED_FILENAME 3.zip.gpg|||0|27|1398283261|0|0
    85|**REDACTED_GUID4**|**REDACTED_GUID5**||file|34047|/34047|34047|/REDACTED_FILENAME.pdf|||0|27|1409772053|0|0
    

    Nothing for orphaned storages.

    When I check the web UI for apps, I only see Full Text Search once in the list. I'm not sure how else to check for this case.

  12. PVince81 commented on Jan 13, 2015

    @PVince81
    Contributor

    I see the error above says error with shared storage 3.

    Is there a storage with this numeric_id in the oc_storage?
    select * from oc_storages where numeric_id=3

  13. fleish commented on Jan 13, 2015

    @fleish
    Author

    Yes, just one
    home::REDACTED_GUID|3

  14. 117 remaining items

  15. jcfischer commented on Feb 17, 2015

    @jcfischer
    Contributor

    @PVince81 - yep, case 2) is our problem from a 6.0.6 to 7.0.4 upgrade

  16. DeepDiver1975 commented on Feb 17, 2015

    @DeepDiver1975
    Contributor

    closeCursor fix, already in stable7/7.0.5

    @PVince81 afaik we reverted that because of issues with oracle - right?

  17. LukasReschke commented on Feb 17, 2015

    @LukasReschke
    Contributor

    I merged No. 2, however, I have no idea if this will get into 7.0.5 or 7.0.6

    @karlitschek Any input here?

  18. PVince81 commented on Feb 17, 2015

    @PVince81
    Contributor

    @DeepDiver1975 dammit, right. Reverted because of Oracle.

  19. karlitschek commented on Feb 17, 2015

    @karlitschek
    Contributor

    @LukasReschke 7.0.5 is still not build. So this would go into 7.0.5

  20. LukasReschke commented on Feb 17, 2015

    @LukasReschke
    Contributor

    @jcfischer 7.0.5 should work then – or the current stable7 branch.

    @karlitschek THX

  21. jcfischer commented on Feb 17, 2015

    @jcfischer
    Contributor

    @LukasReschke - is 7.0.5 Enterprise going to be built this week?

  22. karlitschek commented on Feb 17, 2015

    @karlitschek
    Contributor

    @jcfischer Yes. At the same time than 7.0.5 community

  23. PVince81 commented on Feb 19, 2015

    @PVince81
    Contributor

    @fleish did you have any luck with all the stable7 patches ? See #12801 (comment)

  24. bboule commented on Feb 20, 2015

    @bboule

    Hey Guys will this be addressed in 7.0.5?

  25. LukasReschke commented on Feb 20, 2015

    @LukasReschke
    Contributor

    @bboule That question is answered above... But just to rephrase it again: Yes.

  26. bboule commented on Feb 20, 2015

    @bboule

    I thought so... but I need to set expectations with third partied so I wanted to confirm. Thanks for the help!!

  27. fleish commented on Mar 24, 2015

    @fleish
    Author

    @PVince81 sorry, been busy and forgot to respond. I upgraded via the 7.0.0RC1 -> 7.0.4 path and haven't had time to go back and try it with the proper patches.

  28. locked as resolved and limited conversation to collaborators on Aug 7, 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