About the problem that an internal server error occurs when logging in as a specific user

Steps to reproduce

1.I have upgraded to owncloud 10.0.10 from 8.0.0-20.1
2.After that, there was a problem that an internal server error occurred when logging in as a “23ce3106-2b94-1035-9c0f-75ff4fc40fdd(user_id)” user.
3.This problem was solved by trying the following methods.
Deleted the record of “uid_owner” is “694297dc-074e-1035-9bc8-75ff4fc40fdd” and “share_with” is “23ce3106-2b94-1035-9c0f-75ff4fc40fdd” in the “oc_share” table in MySQL.
“694297dc-074e-1035-9bc8-75ff4fc40fdd” is a user that does not currently exist in LDAP or owncloud.

I’m trying to find out if other users can have this issue as well.
What is the root cause?
Can other users have the above problem of getting an internal server error when logging in?

Server configuration

Operating system:CentOS release 6.6 (Final) x86_64

**Web server:**Apache

**Database:**MySQL

**PHP version:**7.2

ownCloud version: (see ownCloud admin page)10.0.10.4

**Updated from an older ownCloud or fresh install:**Updated from an older ownCloud

**Where did you install ownCloud from:**https://attic.owncloud.org/community/owncloud-10.0.10.tar.bz2

The content of config/config.php:

{
    "system": {
        "instanceid": "*****",
        "passwordsalt": "***REMOVED SENSITIVE VALUE***",
        "secret": "***REMOVED SENSITIVE VALUE***",
        "trusted_domains": [
            "*****",
            "***.***.**.**"
        ],
        "datadirectory": "\/var\/www\/html\/owncloud\/data",
        "overwrite.cli.url": "*****",
        "dbtype": "mysql",
        "version": "10.0.10.4",
        "dbname": "owncloud",
        "dbhost": "localhost",
        "dbtableprefix": "oc_",
        "dbuser": "***REMOVED SENSITIVE VALUE***",
        "dbpassword": "***REMOVED SENSITIVE VALUE***",
        "installed": true,
        "ldapIgnoreNamingRules": false,
        "loglevel": 2,
        "maintenance": false,
        "theme": "",
        "trashbin_retention_obligation": "auto",
        "filelocking.enabled": true,
        "integrity.check.disabled": true
    }
}

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.7.1
  - files_sharing: 0.11.0
  - files_texteditor: 2.0
  - files_trashbin: 0.9.1
  - files_versions: 1.3.0
  - files_videoplayer: 0.9.8
  - files_videoviewer: 0.1.3
  - firstrunwizard: 1.1
  - market: 0.2.5
  - notifications: 0.3.5
  - provisioning_api: 0.5.0
  - systemtags: 0.3.0
  - templateeditor: 0.1
  - user_ldap: 0.12.0
Disabled:
  - activity
  - documents
  - encryption
  - external
  - files_antivirus
  - files_encryption
  - gallery
  - updatenotification
  - updater
  - user_external
  - user_webdavauth

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

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

LDAP configuration (delete this part if not used)

+-------------------------------+--------------------------------------------------------------------+
| Configuration                 | s01                                                                |
+-------------------------------+--------------------------------------------------------------------+
| hasMemberOfFilterSupport      |                                                                    |
| hasPagedResultSupport         |                                                                    |
| homeFolderNamingRule          |                                                                    |
| lastJpegPhotoLookup           | 0                                                                  |
| ldapAgentName                 | cn=***,dc=***,dc=***                                           |
| ldapAgentPassword             | ***                                                                |
| ldapAttributesForGroupSearch  |                                                                    |
| ldapAttributesForUserSearch   |                                                                    |
| ldapBackupHost                |                                                                    |
| ldapBackupPort                |                                                                    |
| ldapBase                      | dc=***,dc=***                                                      |
| ldapBaseGroups                | dc=***,dc=***                                                      |
| ldapBaseUsers                 | dc=***,dc=***                                                      |
| ldapCacheTTL                  | 10                                                                 |
| ldapConfigurationActive       | 1                                                                  |
| ldapDynamicGroupMemberURL     |                                                                    |
| ldapEmailAttribute            | mail                                                               |
| ldapExperiencedAdmin          | 0                                                                  |
| ldapExpertUUIDGroupAttr       |                                                                    |
| ldapExpertUUIDUserAttr        | entryuuid                                                          |
| ldapExpertUsernameAttr        |                                                                    |
| ldapGroupDisplayName          | description                                                        |
| ldapGroupFilter               | (&(|(objectclass=posixGroup)))                                     |
| ldapGroupFilterGroups         |                                                                    |
| ldapGroupFilterMode           | 1                                                                  |
| ldapGroupFilterObjectclass    | posixGroup                                                         |
| ldapGroupMemberAssocAttr      | memberUid                                                          |
| ldapHost                      | ***.***.**.**                                                      |
| ldapIgnoreNamingRules         |                                                                    |
| ldapLoginFilter               | (&(objectclass=OpenLDAPperson)(uid=%uid)(cn=%uid)(userPassword=*)) |
| ldapLoginFilterAttributes     |                                                                    |
| ldapLoginFilterEmail          | 0                                                                  |
| ldapLoginFilterMode           | 1                                                                  |
| ldapLoginFilterUsername       | 1                                                                  |
| ldapNestedGroups              | 0                                                                  |
| ldapOverrideMainServer        | 0                                                                  |
| ldapPagingSize                | 500                                                                |
| ldapPort                      | 389                                                                |
| ldapQuotaAttribute            |                                                                    |
| ldapQuotaDefault              |                                                                    |
| ldapTLS                       | 0                                                                  |
| ldapUserDisplayName           | displayname                                                        |
| ldapUserDisplayName2          |                                                                    |
| ldapUserFilter                | (&(objectclass=OpenLDAPperson)(userPassword=*))                    |
| ldapUserFilterGroups          |                                                                    |
| ldapUserFilterMode            | 1                                                                  |
| ldapUserFilterObjectclass     | OpenLDAPperson                                                     |
| ldapUserName                  | samaccountname                                                     |
| ldapUuidGroupAttribute        | auto                                                               |
| ldapUuidUserAttribute         | auto                                                               |
| turnOffCertCheck              | 0                                                                  |
| useMemberOfToDetectMembership | 1                                                                  |
+-------------------------------+--------------------------------------------------------------------+

Logs

ownCloud log (data/owncloud.log)

 {"reqId":"tDGi3wwD1yPNHhehJcoB","level":3,"time":"2020-09-09T01:52:00+00:00","remoteAddr":"***.**.***.**","user":"23ce3106-2b94-1035-9c0f-75ff4fc40fdd","app":"PHP","method":"GET","url":"\/index.php\/apps\/files\/","message":"count(): Parameter must be an array or an object that implements Countable at \/var\/www\/html\/owncloud\/apps\/user_ldap\/lib\/Access.php#857"}
 {"reqId":"tDGi3wwD1yPNHhehJcoB","level":3,"time":"2020-09-09T01:52:00+00:00","remoteAddr":"***.**.***.**","user":"23ce3106-2b94-1035-9c0f-75ff4fc40fdd","app":"OC\\Files\\Node\\Root","method":"GET","url":"\/index.php\/apps\/files\/","message":"Backends provided no user object for 694297dc-074e-1035-9bc8-75ff4fc40fdd"}
 {"reqId":"tDGi3wwD1yPNHhehJcoB","level":3,"time":"2020-09-09T01:52:00+00:00","remoteAddr":"***.**.***.**","user":"23ce3106-2b94-1035-9c0f-75ff4fc40fdd","app":"index","method":"GET","url":"\/index.php\/apps\/files\/","message":"Exception: {\"Exception\":\"OC\\\\User\\\\NoUserException\",\"Message\":\"Backends provided no user object for 694297dc-074e-1035-9bc8-75ff4fc40fdd\",\"Code\":0,\"Trace\":\"#0 \\\/var\\\/www\\\/html\\\/owncloud\\\/lib\\\/private\\\/Files\\\/Node\\\/LazyRoot.php(64): OC\\\\Files\\\\Node\\\\Root->getUserFolder('694297dc-074e-1...')\\n#1 \\\/var\\\/www\\\/html\\\/owncloud\\\/lib\\\/private\\\/Files\\\/Node\\\/LazyRoot.php(281): OC\\\\Files\\\\Node\\\\LazyRoot->__call('getUserFolder', Array)\\n#2 \\\/var\\\/www\\\/html\\\/owncloud\\\/lib\\\/private\\\/Share20\\\/Share.php(164): OC\\\\Files\\\\Node\\\\LazyRoot->getUserFolder('694297dc-074e-1...')\\n#3 \\\/var\\\/www\\\/html\\\/owncloud\\\/lib\\\/private\\\/Share20\\\/DefaultShareProvider.php(407): OC\\\\Share20\\\\Share->getNode()\\n#4 \\\/var\\\/www\\\/html\\\/owncloud\\\/lib\\\/private\\\/Share20\\\/Manager.php(1063): OC\\\\Share20\\\\DefaultShareProvider->updateForRecipient(Object(OC\\\\Share20\\\\Share), '23ce3106-2b94-1...')\\n#5 \\\/var\\\/www\\\/html\\\/owncloud\\\/lib\\\/private\\\/Share20\\\/Manager.php(1053): OC\\\\Share20\\\\Manager->updateShareForRecipient(Object(OC\\\\Share20\\\\Share), '23ce3106-2b94-1...')\\n#6 \\\/var\\\/www\\\/html\\\/owncloud\\\/apps\\\/files_sharing\\\/lib\\\/MountProvider.php(176): OC\\\\Share20\\\\Manager->moveShare(Object(OC\\\\Share20\\\\Share), '23ce3106-2b94-1...')\\n#7 \\\/var\\\/www\\\/html\\\/owncloud\\\/apps\\\/files_sharing\\\/lib\\\/MountProvider.php(80): OCA\\\\Files_Sharing\\\\MountProvider->buildSuperShares(Array, Object(OC\\\\User\\\\User))\\n#8 \\\/var\\\/www\\\/html\\\/owncloud\\\/lib\\\/private\\\/Files\\\/Config\\\/MountProviderCollection.php(77): OCA\\\\Files_Sharing\\\\MountProvider->getMountsForUser(Object(OC\\\\User\\\\User), Object(OC\\\\Files\\\\Storage\\\\StorageFactory))\\n#9 [internal function]: OC\\\\Files\\\\Config\\\\MountProviderCollection->OC\\\\Files\\\\Config\\\\{closure}(Object(OCA\\\\Files_Sharing\\\\MountProvider))\\n#10 \\\/var\\\/www\\\/html\\\/owncloud\\\/lib\\\/private\\\/Files\\\/Config\\\/MountProviderCollection.php(78): array_map(Object(Closure), Array)\\n#11 \\\/var\\\/www\\\/html\\\/owncloud\\\/lib\\\/private\\\/Files\\\/Filesystem.php(445): OC\\\\Files\\\\Config\\\\MountProviderCollection->getMountsForUser(Object(OC\\\\User\\\\User))\\n#12 \\\/var\\\/www\\\/html\\\/owncloud\\\/lib\\\/private\\\/Files\\\/Filesystem.php(374): OC\\\\Files\\\\Filesystem::initMountPoints('23ce3106-2b94-1...')\\n#13 \\\/var\\\/www\\\/html\\\/owncloud\\\/lib\\\/private\\\/legacy\\\/util.php(294): OC\\\\Files\\\\Filesystem::init('23ce3106-2b94-1...', '\\\/23ce3106-2b94-...')\\n#14 \\\/var\\\/www\\\/html\\\/owncloud\\\/lib\\\/base.php(908): OC_Util::setupFS()\\n#15 \\\/var\\\/www\\\/html\\\/owncloud\\\/index.php(54): OC::handleRequest()\\n#16 {main}\",\"File\":\"\\\/var\\\/www\\\/html\\\/owncloud\\\/lib\\\/private\\\/Files\\\/Node\\\/Root.php\",\"Line\":351}"}

ryota,

When upgrading, did you perfom all the required upgrade steps? (see https://doc.owncloud.com/server/admin_manual/maintenance/upgrade.html)
Skipping those steps would most certainly lead to various issues.

I.e. from your 8.0.0 this would be

8.0.0 -> 8.0.16 -> 8.1.12 -> 8.2.11 -> 10.x

ATM I found only this directory, where you can download older versions:
https://attic.owncloud.org/community/

Unfortunately the packages seem to be currently not available on the ownCloud download pages themselves, so I filled an issue:

1 Like

Thank you for the information.

Important information was missing.
I updated owncloud by following the steps below.

  1. Updated to owncloud 8.0.0-> 8.2.11.
  2. Updated to php 5.4-> 7.2
  3. Update to owncloud 8.2.11-> 10.0.0

I haven’t updated to 8.0.0-> 8.0.16,
Is it possible that this is causing this issue?

In that case, is there a way to deal with it or check if there are any other problems?

You missed two upgrade steps: 8.0.0 -> 8.0.16 and 8.0.16 -> 8.1.12
I’m very sure this is causing issues.

I’d recommend to start upgrading from your original backup, following the required steps.

There are no other ways to cleanup your existing installation, once you have skipped those steps.

1 Like