Shares are lost after upgrade to 10.0.10

Steps to reproduce

  1. owncloud 9.1.8 with AD integration and SMB external storage configured
  2. copy owncloud10.0.10.zip to the server
  3. sudo -u apache php occ maintenance:mode --on
  4. mv owncloud owncloud.old
  5. unzip owncloud-10.0.10.zip
  6. download files_pdfviewer files_texteditor gallery user_ldap activity templateeditor modules
  7. copy them to /owncloud/apps
  8. sudo -u apache php occ upgrade
  9. sudo -u apache php occ maintenance:mode –off
  10. sudo -u apache php occ user:sync "OCA\User_LDAP\User_Proxy"
    Log on owncloud and all shares are lost. Shares where in external storage and shared with LDAP AD Groups

Expected behaviour

Tell us what should happen: Shares are preserved

Actual behaviour

Tell us what happens instead: Shares are lost!

Server configuration

Operating system: CentoOS 7

Web server: Apache

Database: MySQL

PHP version: 5.6

ownCloud version: 10.0.10

Updated from an older ownCloud or fresh install: Update from 9.1.8

Where did you install ownCloud from: owncloud.org

Signing status (ownCloud 9.0 and above):

Login as admin user into your ownCloud and access 
http://example.com/index.php/settings/integrity/failed 
paste the results into https://gist.github.com/ and puth the link here:

https://gist.github.com/juaalo/0448b4b500d0a751bdd6706b77c5eb5e

The content of config/config.php:
{
“system”: {
“instanceid”: “ocaa34qdd6kc”,
“passwordsalt”: “REMOVED SENSITIVE VALUE”,
“secret”: “REMOVED SENSITIVE VALUE”,
“trusted_domains”: [
“192.168.4.18”,
bgbox.nnttr.com”,
“srvv-pruebasbgbox.ad.begar.es”
],
“datadirectory”: “/app1/data/owncloud”,
“overwrite.cli.url”: “http://192.168.4.18/owncloud”,
“dbtype”: “mysql”,
“version”: “10.0.10.4”,
“dbname”: “owncloud”,
“dbhost”: “127.0.0.1”,
“dbtableprefix”: “oc_”,
“dbuser”: “REMOVED SENSITIVE VALUE”,
“dbpassword”: “REMOVED SENSITIVE VALUE”,
“logtimezone”: “Europe/Madrid”,
“installed”: true,
“ldapIgnoreNamingRules”: false,
“mail_smtpmode”: “smtp”,
“mail_from_address”: “REMOVED SENSITIVE VALUE”,
“mail_domain”: “REMOVED SENSITIVE VALUE”,
“mail_smtphost”: “REMOVED SENSITIVE VALUE”,
“mail_smtpport”: “25”,
“appstore.experimental.enabled”: false,
“preview_libreoffice_path”: “/usr/bin/libreoffice”,
“maintenance”: false,
“loglevel”: 2,
“ldapUserCleanupInterval”: 30,
“log_type”: “owncloud”,
“singleuser”: false
}
}

List of activated apps:

Enabled:

  • comments: 0.3.0
  • configreport: 0.1.1
  • dav: 0.4.0
  • federatedfilesharing: 0.3.1
  • federation: 0.1.0
  • files: 1.5.1
  • files_external: 0.7.1
  • files_pdfviewer: 0.9.0
  • files_sharing: 0.11.0
  • files_texteditor: 2.2.1
  • files_trashbin: 0.9.1
  • files_versions: 1.3.0
  • files_videoplayer: 0.9.8
  • firstrunwizard: 1.1
  • gallery: 16.1.0
  • market: 0.2.5
  • notifications: 0.3.5
  • provisioning_api: 0.5.0
  • systemtags: 0.3.0
  • templateeditor: 0.4.0
  • updatenotification: 0.2.1
  • user_ldap: 0.10.0
    Disabled:
  • activity
  • encryption
  • external
  • user_external

Are you using external storage, if yes which one: SMB

Are you using encryption: no

Are you using an external user-backend, if yes which one: ActiveDirectory

LDAP configuration (delete this part if not used)

+-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------+
| Configuration                 |                                                                                                                                                   |
+-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------+
| hasMemberOfFilterSupport      | 1                                                                                                                                                 |
| hasPagedResultSupport         |                                                                                                                                                   |
| homeFolderNamingRule          | attr:samaccountname                                                                                                                               |
| lastJpegPhotoLookup           | 0                                                                                                                                                 |
| ldapAgentName                 | cn=bgbox,cn=users,dc=ad,dc=begar,dc=es                                                                                                            |
| ldapAgentPassword             | ***                                                                                                                                               |
| ldapAttributesForGroupSearch  |                                                                                                                                                   |
| ldapAttributesForUserSearch   |                                                                                                                                                   |
| ldapBackupHost                | 192.168.2.21                                                                                                                                      |
| ldapBackupPort                | 389                                                                                                                                               |
| ldapBase                      | DC=ad,DC=begar,DC=es                                                                                                                              |
| ldapBaseGroups                | ou=owncloud,ou=usuarios,DC=ad,DC=begar,DC=es                                                                                                      |
| ldapBaseUsers                 | ou=usuarios,DC=ad,DC=begar,DC=es                                                                                                                  |
| ldapCacheTTL                  | 600                                                                                                                                               |
| ldapConfigurationActive       | 1                                                                                                                                                 |
| ldapDynamicGroupMemberURL     |                                                                                                                                                   |
| ldapEmailAttribute            | mail                                                                                                                                              |
| ldapExperiencedAdmin          | 0                                                                                                                                                 |
| ldapExpertUUIDGroupAttr       |                                                                                                                                                   |
| ldapExpertUUIDUserAttr        | samaccountname                                                                                                                                    |
| ldapExpertUsernameAttr        |                                                                                                                                                   |
| ldapGroupDisplayName          | samaccountname                                                                                                                                    |
| ldapGroupFilter               | (&(|(objectclass=group)))                                                                                                                         |
| ldapGroupFilterGroups         |                                                                                                                                                   |
| ldapGroupFilterMode           | 0                                                                                                                                                 |
| ldapGroupFilterObjectclass    | group                                                                                                                                             |
| ldapGroupMemberAssocAttr      | member                                                                                                                                            |
| ldapHost                      | 192.168.3.45                                                                                                                                      |
| ldapIgnoreNamingRules         |                                                                                                                                                   |
| ldapLoginFilter               | (&(&(|(objectclass=person))(|(|(memberof=CN=owncloud,OU=OWNCLOUD,OU=Usuarios,DC=ad,DC=begar,DC=es)(primaryGroupID=56619))))(samaccountname=%uid)) |
| ldapLoginFilterAttributes     |                                                                                                                                                   |
| ldapLoginFilterEmail          | 0                                                                                                                                                 |
| ldapLoginFilterMode           | 0                                                                                                                                                 |
| ldapLoginFilterUsername       | 1                                                                                                                                                 |
| ldapNestedGroups              | 0                                                                                                                                                 |
| ldapOverrideMainServer        |                                                                                                                                                   |
| ldapPagingSize                | 0                                                                                                                                                 |
| ldapPort                      | 389                                                                                                                                               |
| ldapQuotaAttribute            |                                                                                                                                                   |
| ldapQuotaDefault              |                                                                                                                                                   |
| ldapTLS                       | 0                                                                                                                                                 |
| ldapUserDisplayName           | samaccountname                                                                                                                                    |
| ldapUserDisplayName2          |                                                                                                                                                   |
| ldapUserFilter                | (&(|(objectclass=person))(|(|(memberof=CN=owncloud,OU=OWNCLOUD,OU=Usuarios,DC=ad,DC=begar,DC=es)(primaryGroupID=56619))))                         |
| ldapUserFilterGroups          | owncloud                                                                                                                                          |
| ldapUserFilterMode            | 0                                                                                                                                                 |
| ldapUserFilterObjectclass     | person                                                                                                                                            |
| ldapUuidGroupAttribute        | auto                                                                                                                                              |
| ldapUuidUserAttribute         | auto                                                                                                                                              |
| turnOffCertCheck              | 0                                                                                                                                                 |
| useMemberOfToDetectMembership | 1                                                                                                                                                 |
+-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------+

Client configuration

Browser: Firefox

Operating system: Windows 10

Logs

Web server error log

Insert your webserver log here

ownCloud log (data/owncloud.log)

loud\/mdepablo for user: mdepablo which differs from existing value: "}
{"reqId":"XTcQxg1eN65a0AVhWElI","level":3,"time":"2019-03-25T12:59:35+01:00","remoteAddr":"","user":"--","app":"no app in context","method":"--","url":"--","message":"User backend OCA\\User_LDAP\\User_Proxy is returning home: \/app1\/data\/owncloud\/lsanchez for user: lsanchez which differs from existing value: "}
{"reqId":"XTcQxg1eN65a0AVhWElI","level":3,"time":"2019-03-25T12:59:35+01:00","remoteAddr":"","user":"--","app":"no app in context","method":"--","url":"--","message":"User backend OCA\\User_LDAP\\User_Proxy is returning home: \/app1\/data\/owncloud\/ARABOX-SAD-CUENCA for user: ARABOX-SAD-CUENCA which differs from existing value: "}
{"reqId":"XTcQxg1eN65a0AVhWElI","level":3,"time":"2019-03-25T12:59:35+01:00","remoteAddr":"","user":"--","app":"no app in context","method":"--","url":"--","message":"User backend OCA\\User_LDAP\\User_Proxy is returning home: \/app1\/data\/owncloud\/ARABOX-CABALLITO for user: ARABOX-CABALLITO which differs from existing value: "}
{"reqId":"XTcQxg1eN65a0AVhWElI","level":3,"time":"2019-03-25T12:59:35+01:00","remoteAddr":"","user":"--","app":"no app in context","method":"--","url":"--","message":"User backend OCA\\User_LDAP\\User_Proxy is returning home: \/app1\/data\/owncloud\/AURIBARRI for user: AURIBARRI which differs from existing value: "}
{"reqId":"XTcQxg1eN65a0AVhWElI","level":3,"time":"2019-03-25T12:59:35+01:00","remoteAddr":"","user":"--","app":"no app in context","method":"--","url":"--","message":"User backend OCA\\User_LDAP\\User_Proxy is returning home: \/app1\/data\/owncloud\/EGALAN for user: EGALAN which differs from existing value: "}
{"reqId":"XTcQxg1eN65a0AVhWElI","level":3,"time":"2019-03-25T12:59:35+01:00","remoteAddr":"","user":"--","app":"no app in context","method":"--","url":"--","message":"User backend OCA\\User_LDAP\\User_Proxy is returning home: \/app1\/data\/owncloud\/BGBOX-PARKING for user: BGBOX-PARKING which differs from existing value: "}
{"reqId":"XTcQxg1eN65a0AVhWElI","level":3,"time":"2019-03-25T12:59:35+01:00","remoteAddr":"","user":"--","app":"no app in context","method":"--","url":"--","message":"User backend OCA\\User_LDAP\\User_Proxy is returning home: \/app1\/data\/owncloud\/jgiraldez for user: jgiraldez which differs from existing value: "}
{"reqId":"XTcQxg1eN65a0AVhWElI","level":3,"time":"2019-03-25T12:59:35+01:00","remoteAddr":"","user":"--","app":"no app in context","method":"--","url":"--","message":"User backend OCA\\User_LDAP\\User_Proxy is returning home: \/app1\/data\/owncloud\/ARABOX-SANTURCE for user: ARABOX-SANTURCE which differs from existing value: "}
{"reqId":"XTcQxg1eN65a0AVhWElI","level":3,"time":"2019-03-25T12:59:35+01:00","remoteAddr":"","user":"--","app":"no app in context","method":"--","url":"--","message":"User backend OCA\\User_LDAP\\User_Proxy is returning home: \/app1\/data\/owncloud\/mjvilela for user: mjvilela which differs from existing value: "}

did you create a db backup?

https://doc.owncloud.com/server/admin_manual/maintenance/manual_upgrade.html

yes, I have a DB Backup

well then you can go back to your backup :slight_smile:

The reason why you lost your shares requires investigation though.

@sistemas_nnttr check your backup and let us know what is in your accounts table for the home column of the above users. That ... which differs from existing value: " without an existing value is very suspicious.

I think the problem is with external storage; we have an SMB external storage called BACKUP, and owncloud access it using an Active Directoy user: AD\bgbox
I´m afraid access to external storage is lost in some point during migration, then when LDAP module is available, access is restored, external storage is scanned, but it´s internal ID is changed, so all the shares defined over this external storage are lost.

I have production server working with 9.1.4
I have a clone test server working with 9.1.4-> migrated to 9.1.8 with no problems and after migrated to 10.0.10 shares are lost.

I am checking differences in both owncloud databases, and something interesting is in os_external_mounts table; in the clone server BACKUP external storage is duplicated:

Prod server:

Test Server after clone and upgrade to 10.0.10:

This is how our external storages are defined in 9.1.8:

I´m afraid that storages defined with $user in REMOTE_SUBFOLDER field are then duplicated. They are not being processed correctly by upgrade process… users are not populated until you execute:
sudo -u apache php occ user:sync "OCA\User_LDAP\User_Proxy

this was not necessary after the upgrade from 9.1.4 -> 9.1.8, but if you do not execute this after upgrade to 10.0.10 Active Directory users are not populated…

Please, could you tell me if this is a BUG, in order to stop doing further testing?
Best regards and many thanks
JJ.-

Hi dmitry!
have you got any update about this problem? I see that there are new versions, do you know if this problem is solved in the new versiones?

Best regards and many thanks!
JJ.-

Hi JJ,

I doubt that there was some progress at this issue.

Can you pinpoint the version upgrade where your issue occurs? From what I read you try to upgrade from 9.1.8 to 10.0.10. Does it happen with 10.0.1?

Also another tip are the migration steps. This are the fixes that have been implemented to help upgrading from one version to another. sometimes those steps get skipped.

But if the issue is that connection to your LDAP / External storage gets separated, and then on reconnect the storage get a new ID causing the shares to get lost, I am not sure if there is something that can be done.