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

Shares are gone in Web UI after upgrade but remains in MySQL #14084

Closed
enoch85 opened this issue Feb 11, 2015 · 15 comments
Closed

Shares are gone in Web UI after upgrade but remains in MySQL #14084

enoch85 opened this issue Feb 11, 2015 · 15 comments

Comments

@enoch85
Copy link
Member

enoch85 commented Feb 11, 2015

Steps to reproduce

  1. The ownCloud install was located in /var/www/cloud.example.se/owncloud (before update)
  2. I updated to ownCloud 8 and the install was extracted to /var/www/owncloud
  3. I did "mv /var/www/cloud.example.se/owncloud/data /var/www/owncloud/data/"
  4. I updated the data dir in config.php to /var/www/owncloud/data
  5. Logged in and the files where GONE from Web UI. The Shares also.
  6. Checked the FTP and the files remained on the servers HDD

EDIT: After a closer look it seems like the files that is visible in the Web UI is the ones that's "left" in the old data dir. /var/www/cloud.example.se/owncloud/data/[user]/files/

Expected behavior

Files and shares should still be visible in the Web UI

Actual behavior

  • Seems like there is something wrong with the symlinks (?)

cloud_db

  • The client also wiped the files locally. New files got uploaded though.
  • Shares are gone ( But still seems to exist in MySQL)

oc_share

Server configuration

Ubuntu Server 14.04

Database:
Server version: 5.5.41-0ubuntu0.14.04.1 - (Ubuntu)
PHP version:
PHP 5.5.9-1ubuntu4.5 (cli) (built: Oct 29 2014 11:59:10)

ownCloud version: (see ownCloud admin page)
8.0
Updated from an older ownCloud or fresh install:
Update from 7.0.4

List of activated apps:
Activity
Calender
Contacts
Deleted files
Documents
First Run Wizard
Full Text Search
PDF Viewer
Pictures
Share Files
Text Editor
Updater
Versions
Video Viewer

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

Client configuration

Browser:
Version 39.0.2171.71 m
Operating system:
Windows 8.1 and XP and Vista
Sync Client
1.7.1 stable

Logs

Web server error log

Insert your webserver log here

ownCloud log (data/owncloud.log)

Deleted the log to get e fresh one before I discovered the error. This is what's left.

Error   PHP Method OC_L10N_String::__toString() must return a string value at /var/www/owncloud/lib/private/util.php#1026   2015-02-11T01:15:22+00:00
Error   PHP vsprintf(): Too few arguments at /var/www/owncloud/lib/private/l10n/string.php#75   2015-02-11T01:15:22+00:00
Error   PHP fopen(/var/www/owncloud/data/admin/files/ownCloudUserManual.pdf): failed to open stream: No such file or directory at /var/www/owncloud/lib/private/files/storage/local.php#216 2015-02-11T01:14:32+00:00
Fatal   remote  An exception occured in driver: SQLSTATE[HY000] [2002] No such file or directory    2015-02-11T01:09:26+00:00
Warning documents   Starting a session failed. Reason: 191728 can not be resolved   2015-02-11T01:06:01+00:00
Error   PHP Call to a member function getId() on a non-object at /var/www/owncloud/apps/gallery/ajax/batch.php#59   2015-02-11T01:05:54+00:00

And a bunch of theese in the old owncloud.log:

"app":"PHP","message":"filemtime(): stat failed for \/var\/www\/cloud.example.se\/owncloud\/data\/admin\/files\/MALM\u00d6\/Program\/Drivrutiner\/Skrivare Malm\u00f6 at \/var\/www\/owncloud\/lib\/private\/files\/storage\/local.php#138","level":3,"time":"2015-02-11T00:54:01+00:00"}

Browser log

Insert your browser log here, this could for example include:

a) The javascript console log
b) The network log 
c) ...
@enoch85
Copy link
Member Author

enoch85 commented Feb 11, 2015

UPDATE:

I ran "./occ files:scan --all" and now the files seems to be back. Thanks to SchrodingersScat & Dominian on IRC.

But what about the shares? They are still gone. Anyone please?

@enoch85 enoch85 changed the title Files are gone in Web UI but remains on Server HDD after upgrade Share are gone in Web UI after upgrade but remains in MySQL Feb 11, 2015
@enoch85
Copy link
Member Author

enoch85 commented Feb 11, 2015

CC @schiesbn

@enoch85 enoch85 changed the title Share are gone in Web UI after upgrade but remains in MySQL Shares are gone in Web UI after upgrade but remains in MySQL Feb 11, 2015
@enoch85
Copy link
Member Author

enoch85 commented Feb 11, 2015

Host: localhost
Database: owncloud
Created: 11 feb 2015 kl 05:32
Generated by: phpMyAdmin 4.0.10deb1 / MySQL 5.5.41-0ubuntu0.14.04.1
SQL-query: SELECT * FROM `oc_share`;
Rows: 42

id  share_type  share_with  uid_owner   parent  item_type   item_source item_target file_source file_target permissions stime   accepted    expiration  token   mail_send   
11  0   malmo1  admin   NULL    folder  2113    /2113   2113    /Malmö1    31  1415782831  0   NULL    NULL    0
12  0   malmo2  admin   NULL    folder  2114    /2114   2114    /Malmö2    31  1415782843  0   NULL    NULL    0
15  0   malmo5  admin   NULL    folder  2120    /2120   2120    /Malmö5    31  1415782877  0   NULL    NULL    0
16  0   malmo6  admin   NULL    folder  2121    /2121   2121    /Malmö6    31  1415782887  0   NULL    NULL    0
17  0   malmo7  admin   NULL    folder  2122    /2122   2122    /Malmö7    31  1415782898  0   NULL    NULL    0
18  0   malmo8  admin   NULL    folder  2123    /2123   2123    /Malmö8    31  1415782906  0   NULL    NULL    0
19  0   malmo4  admin   NULL    folder  2118    /2118   2118    /Malmö4    31  1415782965  0   NULL    NULL    0
20  0   malmoadmin  admin   NULL    folder  334 /334    334 /MALMÖ 31  1415782986  0   NULL    NULL    0
21  0   vasterasadmin   admin   NULL    folder  2124    /2124   2124    /VÄSTERÅS 31  1415782993  0   NULL    NULL    0
24  0   malmo1  admin   NULL    folder  2004    /2004   2004    /Program    1   1415787438  0   NULL    NULL    0
25  0   malmo2  admin   NULL    folder  2004    /2004   2004    /Program    1   1415787442  0   NULL    NULL    0
26  0   malmo4  admin   NULL    folder  2004    /2004   2004    /Program    1   1415787655  0   NULL    NULL    0
27  0   malmo5  admin   NULL    folder  2004    /2004   2004    /Program    1   1415787658  0   NULL    NULL    0
28  0   malmo6  admin   NULL    folder  2004    /2004   2004    /Program    1   1415787661  0   NULL    NULL    0
29  0   malmo7  admin   NULL    folder  2004    /2004   2004    /Program    1   1415787665  0   NULL    NULL    0
30  0   malmo8  admin   NULL    folder  2004    /2004   2004    /Program    1   1415787668  0   NULL    NULL    0
32  0   malmo3  admin   NULL    folder  2115    /2115   2115    /Malmö3    31  1415787738  0   NULL    NULL    0
33  0   malmo3  admin   NULL    folder  2004    /2004   2004    /Program    1   1415787748  0   NULL    NULL    0
34  0   vasteras1   admin   NULL    folder  2126    /2126   2126    /Program    15  1415788355  0   NULL    NULL    0
35  0   vasteras2   admin   NULL    folder  2126    /2126   2126    /Program    15  1415788358  0   NULL    NULL    0
36  0   vasteras3   admin   NULL    folder  2126    /2126   2126    /Program    15  1415788362  0   NULL    NULL    0
37  0   Vital Halsa admin   NULL    folder  2478    /2478   2478    /Vital Hälsa   7   1415828122  0   NULL    NULL    0
47  0   Elias   admin   NULL    folder  2478    /2478   2478    /Vital Hälsa   31  1416231147  0   NULL    NULL    0
48  0   Jonny   admin   NULL    folder  330 /330    330 /Dokument   31  1416231434  0   NULL    NULL    0
50  3   NULL    admin   NULL    folder  330 /330    330 /Dokument   7   1416231446  0   NULL    b948SECRET  0
51  0   Elias   admin   NULL    folder  14981   /14981  14981   /JV ALLA    31  1416298771  0   NULL    NULL    0
52  0   Jonny   admin   NULL    folder  14981   /14981  14981   /JV ALLA    31  1416777600  0   NULL    NULL    0
56  0   nijma   malmoadmin  20  file    78254   /78254  78254   /Fullmakt TelenorBTT Sverige AB.docx    23  1418224886  0   NULL    NULL    1
57  3   NULL    malmoadmin  20  file    78254   /334    78254   /MALMÖ 1   1418224889  0   NULL    b948SECRET0
59  3   b948SECRET  admin   NULL    file    2016    /2016   2016    /AdbeRdr11006_en_US.exe 1   1418751734  0   2015-01-22 00:00:00 b948SECRET  0
60  0   vasteras1   admin   NULL    folder  2319    /2319   2319    /Västerås1    31  1419181349  0   NULL    NULL    0
61  0   vasteras2   admin   NULL    folder  2320    /2320   2320    /Västerås2    31  1419181366  0   NULL    NULL    0
62  0   vasteras3   admin   NULL    folder  2321    /2321   2321    /Västerås3    31  1419181387  0   NULL    NULL    0
63  0   vasteras4   admin   NULL    folder  85419   /85419  85419   /Västerås4    31  1419181408  0   NULL    NULL    0
64  0   vasteras5   admin   NULL    folder  85422   /85422  85422   /Västerås5    31  1419181466  0   NULL    NULL    0
66  0   vasterasadmin   admin   NULL    folder  14981   /14981  14981   /JV ALLA    31  1419181597  0   NULL    NULL    0
67  0   vasterasadmin   admin   NULL    folder  2478    /2478   2478    /Vital Hälsa   31  1419181620  0   NULL    NULL    0
68  0   vasteras4   admin   NULL    folder  2126    /2126   2126    /Program    15  1419181687  0   NULL    NULL    0
69  0   vasteras5   admin   NULL    folder  2126    /2126   2126    /Program    15  1419181695  0   NULL    NULL    0
71  0   Marty   admin   NULL    folder  14981   /14981  14981   /JV ALLA    31  1419185554  0   NULL    NULL    0
73  3   b948SECRET  admin   NULL    folder  85422   /85422  85422   /Västerås5    1   1420563013  0   NULL    b948SECRET  0
79  3   NULL    admin   NULL    file    13170   /13170  13170   /Lösenord fsgo.odt 1   1421756531  0   2015-01-27 00:00:00 b948SECRET

@enoch85
Copy link
Member Author

enoch85 commented Feb 11, 2015

I tested to create new shares and it worked.

@enoch85
Copy link
Member Author

enoch85 commented Feb 11, 2015

Not so urgent anymore. Did re-share every share again manually. One more night without sleep. :)

Keeping this open anyway.

@martin-rueegg
Copy link
Contributor

i actually had a simmilar issue: my /var/www/owncloud/data is a symlink to an other place. during update to v8 the symlink has been removed and replaced by a fresh data-dir.

resulting in:

  • files not visible in ui
  • files deleted on all local clients

after stopping the webserver, replacing the dir with the symlink again, restarting the webserver, doing the "./occ files:scan --all" the files where back again and downloaded to the clients.

(not sure if the "./occ files:scan --all" would really have been necessary though)

also had the issue with the shares. while the shares within OC (to other users) still worked, the URL shares did not.

@ghost
Copy link

ghost commented Mar 8, 2015

@martin-rueegg
Not quite sure if this is also valid for the data dir itself:

ownCloud’s file scanner does not follow symlinks, which could lead to infinite loops. To avoid this do not use soft or hard links in your ownCloud data directory.

from https://doc.owncloud.org/server/8.0/admin_manual/release_notes.html

@enoch85
Copy link
Member Author

enoch85 commented Mar 23, 2015

@MorrisJobke What do you think? Milestone 8.2?

@MorrisJobke
Copy link
Contributor

@DeepDiver1975 Another issue with broken shares. Maybe it's also related to broken fileids: #13310

@PVince81
Copy link
Contributor

PVince81 commented Apr 9, 2015

I don't see how @enoch85's steps would break the file ids. Unless the files were moved cross-storage within ownCloud ?

@enoch85
Copy link
Member Author

enoch85 commented Jun 11, 2015

@PVince81 What I did was to export the MySQL tables and imported them on a fresh install.

@enoch85
Copy link
Member Author

enoch85 commented Sep 22, 2015

@PVince81 Any milstone on this?

@MorrisJobke
Copy link
Contributor

@PVince81 Any milstone on this?

@enoch85 This should not happen with 8.1+ anymore. Have you experienced this since 8.1 again?

@enoch85
Copy link
Member Author

enoch85 commented Jan 6, 2016

@MorrisJobke No, I think it was a very specefic case. Close if you want.

@lock
Copy link

lock bot commented Aug 7, 2019

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.

@lock lock bot locked as resolved and limited conversation to collaborators Aug 7, 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

4 participants