-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
[10.0] Moving home folder to new data dir breaks due to absolute path in DB #27693
Comments
Looks like this issue exists in latest 10.0.2. I've migrated my OC installation into Docker containers, I double checked everything in the new setup, but it didn't work properly (desktop clients get errors on sync, image preview doesn't work). Then I checked owncloud.log and saw the old data directory path. It seemed like OC simply ignored the updated datadirectory parameter. Then I grepped my database dump for the old path and was very surprised. Then I googled and found this issue. This is so frustrating considering that every other tutorial on the internet shows that updating datadirectory in config.php is enough. I've already spent a week slaving at my Docker OC setup trying to figure this out. In my OC setup the hardcoded data directory path is seen in oc_accounts and oc_storages tables. |
Instead of checking lastLogin != null I would prefer to check if the home storage has been created in he db. That is more correct. btw. The home folder is hardcoded in the db in the account table intentionally to prevent data loss on unintended changes in ldap or the configuration. |
You can now change the hardcoded mount: |
@cdamken sure, I saw the manual page. I've tried the SQL commands to update the paths, but it gave me "duplicate entry ... for key ..." errors. Using the |
Hey, this issue has been closed because the label |
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. |
Steps
Expected result
Files app and Webdav must refuse to work with "StorageNotAvailableException" because the home folder cannot be found.
Actual result
Home folder gets recreated in the old location, with the new folder but not the old files... (which are still in oc_filecache).
Versions
ownCloud 10.0.0 RC1
Solution
Only allow creating the home folder in code whenever a user has never logged in before (lastLogin in DB is null). If the home folder is missing, throw
StorageNotAvailableException
.For migration purposes, we'll need to introduce new occ commands:
Not tagging as regression as moving home folders in past versions could break in different ways.
@DeepDiver1975 @butonic @cdamken @pmaier1 FYI
The text was updated successfully, but these errors were encountered: