Closed gael-ian closed 7 years ago
Did you do any backup restoration in-between ? Did you ever run occ files:scan
to repair something like missing files ? (don't do it!)
Hi @PVince81
I did not try to restore any backup of any sort. I only runned occ upgrade
to complete manual upgrades and, as I said in the first message, since the problems appeared, flushed the file cache and rescan files with occ
.
There's no file missing, everything seems to be fine both on my computer and on the server, once synchronized via the ownCloud client, but the web front-end is not able to open any file anymore.
How can I fix it ?
flushed the file cache
please restore it from your backup.
Never flush the file cache. When using encryption it stores an encryption counter in the "encryption" column. It is likely that this value is lost so it cannot decrypt any more.
please restore it from your backup.
What exactly should I restore? The entire database ? or just the oc_filecache
table?
What will happen to files added to my local ownCloud folder since? They have already been synchronized to the server. Will they be synchronized again (and I'm ok with that)? destroyed from my local directories (that I don't want!)? considered as added manually to the server data directory (that is not supported) and create more errors (that is not a solution)?
I tried to restore the entire database and the web front-end seems to work again but the desktop client was not even able to deal with changes in directories that already exist when the dump was created.
Does the file cache also stored the disappeared link shares?
Never flush the file cache
Why is it even possible to flush the file cache if it stores such vital informations?
By definition, a cache is supposed to store data to be accessed faster and thus speed up an application, just that. It can contain both raw or computed data but it's supposed to be easy to flush and rebuild it. So either it's not a cache and maybe you should rename it and remove from occ
any way to flush it or it is a cache and encryption counters (and shares?) should be stored elsewhere.
So either it's not a cache
Exactly:
The problem:
- many people believe this table is just a cache that can be cleared and sometimes resort to clearing it
- clearing the file cache loses association of shares, tags, etc with files
-> https://github.com/owncloud/core/issues/18027
But i really wonder how you have cleared that? Just TRUNCATE the oc_filecache table?
There's a command occ files:cleanup
. I tested it and it doesn't clear the file cache but only tries to repair and remove orphaned entries.
So if that's what you did it hasn't cleared your oc_filecache table.
Now back to the issue: when updating was openssl also updated maybe ? Upgrading to a minor version shouldn't affect any keys.
My personal ownCloud went through all 9.1.x versions up to 9.1.5 with encryption enabled, but I haven't met any such issue.
@PVince81: I didn't notice if there was an openssl update at the same time and it was more than one month ago now so it will be difficult to find.
@kdslkdsaldsal: We are 3 administrators on this machine and if I am the main user of ownCloud I was not the one who finalized the upgrade manually. I'm investigating to find what was exactly done at this time to give you more informations.
Anyway, I solved my problem reuploading most of my data, as files added since the upgrade just work well.
After some more research, the file cache has been cleared with a DELETE request on the database... This "solution" seems to come from the owncloud forum but I was not able to find the topic back.
Sorry for the inconvenience
Indeed such old posts / "solutions" are no good. @PVince81 mentioned that in the linked issue https://github.com/owncloud/core/issues/18027
If people do find about old blogs advising to clear oc_filecache, they won't find this table. Having the table as oc_fileindex will give the impression that it is something different, so more of a psychological solution
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.
Hi,
Since I upgraded my ownCloud instance to 9.1.4, I can't open any file in web frontend. The problem seems to be an encryption issue but everything worked well before the upgrade and no operation other than the upgrade has been applied.
Expected behaviour
File should be able to be opened in web frontend: PDF with viewer, images with Gallery, etc.
Actual behaviour
Unable to open any encrypted file in web frontend. Opening a PDF ends with a "Bad signature" exception and opening and image just fails.
Except for the ownCloud user manual at the root of my home directory, the only file that was present when encryption was activated, no file can be opened via Web UI.
No password or encryption key has been changed. The only maintenance operations executed on this instance are manual upgrade completion and, since problems appears, file cache flush and full file rescan.
Server configuration
Operating system: Debian 7.11
Web server: Apache 2.2.22
Database: MySQL 5.6.35
PHP version: 5.6.30
ownCloud version: 9.1.5.2
No errors reported by integrity checks.
ownCloud has been first installed in August 2016 via official packages and regularly upgraded since via apt-get. Problems appeared after upgrading to 9.1.4.
Configuration report
List of activated apps:
Are you using external storage, if yes which one: No external storage
Are you using encryption: Yes. Basic encryption activated right after first installation of ownCloud. The only file that existed prior installation is the ownCloud user manual and it's the only file that can be opened now via web frontend.
Are you using an external user-backend, if yes which one: No
Client configuration
Browser: Irrelevant. Problems occur in any browser.
Operating system: Irrelevant. Problems occur on multiple posts running either Windows or Linux.
Logs
ownCloud log (data/owncloud.log)
When trying to open a PDF file:
When trying to open a photo: