You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is this just on update?
Seems to me that any time an admin could decide to move a data directory, and it could potentially break ownCloud because the filecache keeps the path. @bboule I seem to remember this happening to you before.
Cool, thanks.
Next question: If you upgraded from back then, is the old path kept?
Is it possible that a current setup could still have the hard coded path because it was upgraded from a hard coded path oC version?
You are right, an admin could move the directory any time. Maybe we need that check in checkServer to prevent this (or show a warning) at any time.
It was introduced in 5.0.12 to be exact when the new home::$user storage was introduced, but no upgrade path was provided.
A current setup can unfortunately still have the hard-coded path, it happened many times already (see #6493 and linked tickets) .
As long as the admin doesn't move the datadir until OC 8, they should be fine (the repair routine is in OC 8).
BUT if they moved the datadir, then the following will happen when user "user1" logs in:
The old local::$olddatadir/user1/ entry is not recognized any more, so the code decides to create a new entry home::user1.
The new entry home::user1 gets a new matching file cache.
Older share entries are still linked with the old storage (by file id) and are lost.
Ghost shares might appear in the UI (folders that cannot be entered), at least in OC 6 (OC 7 changed the approach so the ghost shares might not appear any more)
"user1" continues to use their storage, creates new shares, etc
If we let people continue using ownCloud in that "broken" state, there is no chance for our repair step from OC8 to repair it because it cannot decide whether the real/wanted files are in the old storage entry or the new storage entry, depending on how long the "broken" version has been used.
I just wanted to update and stumbled into this open knife. I went the update path from <5 and moved my data. Shares don't work correctly. Now I'm tying to clean my database with phpAdmin. Please don't leave open holes like that. I never really got a warning message about duplicate storages.
It was not possible for me to update to 8.x before moving the data. I had to change to another server because there was no adequate php version for updating. Finally after the sixth or so attempt to move and upgrade I manually changed the rows in oc_storage from local::/x/y/z to home::z. This worked. All other attempts lead to duplicate entries, chaos and frustration. Cleaning these duplicates up without loosing shares was too complicated. So I had to return to the data from 7.x multiple times.
Activity
MTRichards commentedon Sep 5, 2014
Is this just on update?
Seems to me that any time an admin could decide to move a data directory, and it could potentially break ownCloud because the filecache keeps the path.
@bboule I seem to remember this happening to you before.
karlitschek commentedon Sep 6, 2014
@MTRichards The hardcoded path should be gone in newer ownCloud versions. So this repair routine is to fix old installations only.
MTRichards commentedon Sep 6, 2014
When was it introduced? In oc 6?
karlitschek commentedon Sep 6, 2014
5 or earlier
MTRichards commentedon Sep 6, 2014
Cool, thanks.
Next question: If you upgraded from back then, is the old path kept?
Is it possible that a current setup could still have the hard coded path because it was upgraded from a hard coded path oC version?
PVince81 commentedon Sep 8, 2014
You are right, an admin could move the directory any time. Maybe we need that check in
checkServerto prevent this (or show a warning) at any time.It was introduced in 5.0.12 to be exact when the new
home::$userstorage was introduced, but no upgrade path was provided.A current setup can unfortunately still have the hard-coded path, it happened many times already (see #6493 and linked tickets) .
As long as the admin doesn't move the datadir until OC 8, they should be fine (the repair routine is in OC 8).
BUT if they moved the datadir, then the following will happen when user "user1" logs in:
local::$olddatadir/user1/entry is not recognized any more, so the code decides to create a new entryhome::user1.home::user1gets a new matching file cache.If we let people continue using ownCloud in that "broken" state, there is no chance for our repair step from OC8 to repair it because it cannot decide whether the real/wanted files are in the old storage entry or the new storage entry, depending on how long the "broken" version has been used.
PVince81 commentedon Sep 8, 2014
To clarify @karlitschek 's comment, if your setup upgraded from a version < 5.0.12 then you are likely to have legacy home storages.
If your first OC install was from > 5.0.12 then you won't have this issue.
MTRichards commentedon Sep 8, 2014
Got it. Ok. We need to note this problem in release notes.
MTRichards commentedon Sep 8, 2014
@felixboehm you need to know this right now, so that in your coming upgrade you are aware of this situation.
felixboehm commentedon Sep 10, 2014
is there a possibility to check, if the data dir was moved?
PVince81 commentedon Sep 10, 2014
There is no accurate way.
We'd need to store the datadir in the database or in a separate config to be able to check against it.
PVince81 commentedon Oct 13, 2015
Since OC 7 is EOL'd soon and only accepts security fixes, this can be closed.
As soon as people update to 8.0 their database will (hopefully) be fixed and this case cannot happen any more. Closing.
c-holtermann commentedon Nov 22, 2015
I just wanted to update and stumbled into this open knife. I went the update path from <5 and moved my data. Shares don't work correctly. Now I'm tying to clean my database with phpAdmin. Please don't leave open holes like that. I never really got a warning message about duplicate storages.
c-holtermann commentedon Nov 23, 2015
It was not possible for me to update to 8.x before moving the data. I had to change to another server because there was no adequate php version for updating. Finally after the sixth or so attempt to move and upgrade I manually changed the rows in oc_storage from local::/x/y/z to home::z. This worked. All other attempts lead to duplicate entries, chaos and frustration. Cleaning these duplicates up without loosing shares was too complicated. So I had to return to the data from 7.x multiple times.
lock commentedon 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.