Skip to content
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

NC15 bug, client does not work for users which have shared files from deleted LDAP users #15161

Closed
deajan opened this issue Apr 18, 2019 · 8 comments
Labels
0. Needs triage Pending check for reproducibility or if it fits our roadmap bug feature: install and update feature: ldap

Comments

@deajan
Copy link

deajan commented Apr 18, 2019

Hello,

I updated my Nextcloud 13.0.4 instance to 14 and then to 15.0.7.
Everything worked smootly, except for a couple of LDAP users. The user can login via web, but cannot use the Nextcloud client (v2.5.1 Windows 10 x64).

Everytime the user logs in or try to sync via the client, I get an error message in the nextcloud log, that shows the "user" property with a GUID (which is valid, tested via occ user, and maps to the user it should), and a message showing another GUID (which exists but is a deleted user).

Somehow, Nextcloud gives a wrong GUID as argument to getHome, even when "user" property is the right GUID in the request. Both GUIDs exist in oc_ldap_user_mapping (and map to the right corresponding DN).

Btw, willing to do debug work, mysql queries etc in order to find what is wrong.

Here are the logs (changed valid GUID to XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX) and deleted user GUID to YYYYYYYY-YYYY-YYYY-YYYY-YYYYYYYYYYYY).

{
	"reqId": "XLh41ngvclWIwDylP7UBuQAAANc",
	"level": 3,
	"time": "2019-04-18T13:17:10+00:00",
	"remoteAddr": "XX.XX.XX.XX",
	"user": "XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX",
	"app": "no app in context",
	"method": "PROPFIND",
	"url": "\/remote.php\/dav\/files\/XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX\/",
	"message": {
		"Exception": "OC\\User\\NoUserException",
		"Message": "YYYYYYYY-YYYY-YYYY-YYYY-YYYYYYYYYYYY is not a valid user anymore",
		"Code": 0,
		"Trace": [{
				"function": "getHome",
				"class": "OCA\\User_LDAP\\User_LDAP",
				"type": "->",
				"args": ["YYYYYYYY-YYYY-YYYY-YYYY-YYYYYYYYYYYY"]
			}, {
				"file": "\/var\/www\/some.vhost.local\/ftp\/www\/apps\/user_ldap\/lib\/User_Proxy.php",
				"line": 81,
				"function": "call_user_func_array",
				"args": [[{
							"__class__": "OCA\\User_LDAP\\User_LDAP"
						}, "getHome"], ["YYYYYYYY-YYYY-YYYY-YYYY-YYYYYYYYYYYY"]]
			}, {
				"file": "\/var\/www\/some.vhost.local\/ftp\/www\/apps\/user_ldap\/lib\/Proxy.php",
				"line": 152,
				"function": "walkBackends",
				"class": "OCA\\User_LDAP\\User_Proxy",
				"type": "->",
				"args": ["YYYYYYYY-YYYY-YYYY-YYYY-YYYYYYYYYYYY", "getHome", ["YYYYYYYY-YYYY-YYYY-YYYY-YYYYYYYYYYYY"]]
			}, {
				"file": "\/var\/www\/some.vhost.local\/ftp\/www\/apps\/user_ldap\/lib\/User_Proxy.php",
				"line": 227,
				"function": "handleRequest",
				"class": "OCA\\User_LDAP\\Proxy",
				"type": "->",
				"args": ["YYYYYYYY-YYYY-YYYY-YYYY-YYYYYYYYYYYY", "getHome", ["YYYYYYYY-YYYY-YYYY-YYYY-YYYYYYYYYYYY"]]
			}, {
				"file": "\/var\/www\/some.vhost.local\/ftp\/www\/lib\/private\/User\/User.php",
				"line": 282,
				"function": "getHome",
				"class": "OCA\\User_LDAP\\User_Proxy",
				"type": "->",
				"args": ["YYYYYYYY-YYYY-YYYY-YYYY-YYYYYYYYYYYY"]
			}, {
				"file": "\/var\/www\/some.vhost.local\/ftp\/www\/lib\/private\/Files\/Storage\/Home.php",
				"line": 53,
				"function": "getHome",
				"class": "OC\\User\\User",
				"type": "->",
				"args": []
			}, {
				"file": "\/var\/www\/some.vhost.local\/ftp\/www\/lib\/private\/Files\/Mount\/MountPoint.php",
				"line": 147,
				"function": "__construct",
				"class": "OC\\Files\\Storage\\Home",
				"type": "->",
				"args": [{
						"user": {
							"__class__": "OC\\User\\User"
						}
					}
				]
			}, {
				"file": "\/var\/www\/some.vhost.local\/ftp\/www\/lib\/private\/Files\/Mount\/MountPoint.php",
				"line": 172,
				"function": "createStorage",
				"class": "OC\\Files\\Mount\\MountPoint",
				"type": "->",
				"args": []
			}, {
				"file": "\/var\/www\/some.vhost.local\/ftp\/www\/lib\/private\/Files\/Filesystem.php",
				"line": 321,
				"function": "getStorage",
				"class": "OC\\Files\\Mount\\MountPoint",
				"type": "->",
				"args": []
			}, {
				"file": "\/var\/www\/some.vhost.local\/ftp\/www\/lib\/private\/Files\/Filesystem.php",
				"line": 443,
				"function": "getStorage",
				"class": "OC\\Files\\Filesystem",
				"type": "::",
				"args": ["YYYYYYYY-YYYY-YYYY-YYYY-YYYYYYYYYYYY"]
			}, {
				"file": "\/var\/www\/some.vhost.local\/ftp\/www\/apps\/files_sharing\/lib\/SharedStorage.php",
				"line": 127,
				"function": "initMountPoints",
				"class": "OC\\Files\\Filesystem",
				"type": "::",
				"args": ["YYYYYYYY-YYYY-YYYY-YYYY-YYYYYYYYYYYY"]
			}, {
				"file": "\/var\/www\/some.vhost.local\/ftp\/www\/apps\/files_sharing\/lib\/SharedStorage.php",
				"line": 482,
				"function": "init",
				"class": "OCA\\Files_Sharing\\SharedStorage",
				"type": "->",
				"args": []
			}, {
				"file": "\/var\/www\/some.vhost.local\/ftp\/www\/lib\/private\/Files\/Storage\/Wrapper\/Jail.php",
				"line": 220,
				"function": "getWrapperStorage",
				"class": "OCA\\Files_Sharing\\SharedStorage",
				"type": "->",
				"args": []
			}, {
				"file": "\/var\/www\/some.vhost.local\/ftp\/www\/apps\/files_sharing\/lib\/SharedStorage.php",
				"line": 199,
				"function": "getPermissions",
				"class": "OC\\Files\\Storage\\Wrapper\\Jail",
				"type": "->",
				"args": [""]
			}, {
				"file": "\/var\/www\/some.vhost.local\/ftp\/www\/lib\/private\/Files\/Storage\/Wrapper\/Wrapper.php",
				"line": 215,
				"function": "getPermissions",
				"class": "OCA\\Files_Sharing\\SharedStorage",
				"type": "->",
				"args": [""]
			}, {
				"file": "\/var\/www\/some.vhost.local\/ftp\/www\/apps\/files_sharing\/lib\/Cache.php",
				"line": 148,
				"function": "getPermissions",
				"class": "OC\\Files\\Storage\\Wrapper\\Wrapper",
				"type": "->",
				"args": [""]
			}, {
				"file": "\/var\/www\/some.vhost.local\/ftp\/www\/apps\/files_sharing\/lib\/Cache.php",
				"line": 114,
				"function": "formatCacheEntry",
				"class": "OCA\\Files_Sharing\\Cache",
				"type": "->",
				"args": [{
						"__class__": "OC\\Files\\Cache\\CacheEntry"
					}, ""]
			}, {
				"file": "\/var\/www\/some.vhost.local\/ftp\/www\/lib\/private\/Files\/FileInfo.php",
				"line": 359,
				"function": "get",
				"class": "OCA\\Files_Sharing\\Cache",
				"type": "->",
				"args": [""]
			}, {
				"file": "\/var\/www\/some.vhost.local\/ftp\/www\/lib\/private\/Files\/FileInfo.php",
				"line": 185,
				"function": "updateEntryfromSubMounts",
				"class": "OC\\Files\\FileInfo",
				"type": "->",
				"args": ["*** sensitive parameters replaced ***"]
			}, {
				"file": "\/var\/www\/some.vhost.local\/ftp\/www\/lib\/private\/Files\/Node\/Node.php",
				"line": 207,
				"function": "getEtag",
				"class": "OC\\Files\\FileInfo",
				"type": "->",
				"args": []
			}, {
				"file": "\/var\/www\/some.vhost.local\/ftp\/www\/apps\/dav\/lib\/Connector\/Sabre\/Node.php",
				"line": 188,
				"function": "getEtag",
				"class": "OC\\Files\\Node\\Node",
				"type": "->",
				"args": []
			}, {
				"file": "\/var\/www\/some.vhost.local\/ftp\/www\/apps\/dav\/lib\/Connector\/Sabre\/FilesPlugin.php",
				"line": 333,
				"function": "getETag",
				"class": "OCA\\DAV\\Connector\\Sabre\\Node",
				"type": "->",
				"args": []
			}, {
				"file": "\/var\/www\/some.vhost.local\/ftp\/www\/3rdparty\/sabre\/dav\/lib\/DAV\/PropFind.php",
				"line": 98,
				"function": "OCA\\DAV\\Connector\\Sabre\\{closure}",
				"class": "OCA\\DAV\\Connector\\Sabre\\FilesPlugin",
				"type": "->",
				"args": ["*** sensitive parameters replaced ***"]
			}, {
				"file": "\/var\/www\/some.vhost.local\/ftp\/www\/apps\/dav\/lib\/Connector\/Sabre\/FilesPlugin.php",
				"line": 334,
				"function": "handle",
				"class": "Sabre\\DAV\\PropFind",
				"type": "->",
				"args": ["{DAV:}getetag", {
						"__class__": "Closure"
					}
				]
			}, {
				"function": "handleGetProperties",
				"class": "OCA\\DAV\\Connector\\Sabre\\FilesPlugin",
				"type": "->",
				"args": [{
						"__class__": "Sabre\\DAV\\PropFind"
					}, {
						"__class__": "OCA\\DAV\\Files\\FilesHome"
					}
				]
			}, {
				"file": "\/var\/www\/some.vhost.local\/ftp\/www\/3rdparty\/sabre\/event\/lib\/EventEmitterTrait.php",
				"line": 105,
				"function": "call_user_func_array",
				"args": [[{
							"__class__": "OCA\\DAV\\Connector\\Sabre\\FilesPlugin"
						}, "handleGetProperties"], [{
							"__class__": "Sabre\\DAV\\PropFind"
						}, {
							"__class__": "OCA\\DAV\\Files\\FilesHome"
						}
					]]
			}, {
				"file": "\/var\/www\/some.vhost.local\/ftp\/www\/3rdparty\/sabre\/dav\/lib\/DAV\/Server.php",
				"line": 1059,
				"function": "emit",
				"class": "Sabre\\Event\\EventEmitter",
				"type": "->",
				"args": ["propFind", [{
							"__class__": "Sabre\\DAV\\PropFind"
						}, {
							"__class__": "OCA\\DAV\\Files\\FilesHome"
						}
					]]
			}, {
				"file": "\/var\/www\/some.vhost.local\/ftp\/www\/3rdparty\/sabre\/dav\/lib\/DAV\/Server.php",
				"line": 981,
				"function": "getPropertiesByNode",
				"class": "Sabre\\DAV\\Server",
				"type": "->",
				"args": [{
						"__class__": "Sabre\\DAV\\PropFind"
					}, {
						"__class__": "OCA\\DAV\\Files\\FilesHome"
					}
				]
			}, {
				"file": "\/var\/www\/some.vhost.local\/ftp\/www\/3rdparty\/sabre\/dav\/lib\/DAV\/Server.php",
				"line": 1666,
				"function": "getPropertiesIteratorForPath",
				"class": "Sabre\\DAV\\Server",
				"type": "->",
				"args": ["files\/XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX", ["{DAV:}getetag"], 0]
			}, {
				"file": "\/var\/www\/some.vhost.local\/ftp\/www\/3rdparty\/sabre\/dav\/lib\/DAV\/CorePlugin.php",
				"line": 355,
				"function": "generateMultiStatus",
				"class": "Sabre\\DAV\\Server",
				"type": "->",
				"args": [{
						"__class__": "Generator"
					}, false]
			}, {
				"function": "httpPropFind",
				"class": "Sabre\\DAV\\CorePlugin",
				"type": "->",
				"args": [{
						"absoluteUrl": "https:\/\/some.vhost.local\/remote.php\/dav\/files\/XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX\/",
						"__class__": "Sabre\\HTTP\\Request"
					}, {
						"__class__": "Sabre\\HTTP\\Response"
					}
				]
			}, {
				"file": "\/var\/www\/some.vhost.local\/ftp\/www\/3rdparty\/sabre\/event\/lib\/EventEmitterTrait.php",
				"line": 105,
				"function": "call_user_func_array",
				"args": [[{
							"__class__": "Sabre\\DAV\\CorePlugin"
						}, "httpPropFind"], [{
							"absoluteUrl": "https:\/\/some.vhost.local\/remote.php\/dav\/files\/XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX\/",
							"__class__": "Sabre\\HTTP\\Request"
						}, {
							"__class__": "Sabre\\HTTP\\Response"
						}
					]]
			}, {
				"file": "\/var\/www\/some.vhost.local\/ftp\/www\/3rdparty\/sabre\/dav\/lib\/DAV\/Server.php",
				"line": 479,
				"function": "emit",
				"class": "Sabre\\Event\\EventEmitter",
				"type": "->",
				"args": ["method:PROPFIND", [{
							"absoluteUrl": "https:\/\/some.vhost.local\/remote.php\/dav\/files\/XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX\/",
							"__class__": "Sabre\\HTTP\\Request"
						}, {
							"__class__": "Sabre\\HTTP\\Response"
						}
					]]
			}, {
				"file": "\/var\/www\/some.vhost.local\/ftp\/www\/3rdparty\/sabre\/dav\/lib\/DAV\/Server.php",
				"line": 254,
				"function": "invokeMethod",
				"class": "Sabre\\DAV\\Server",
				"type": "->",
				"args": [{
						"absoluteUrl": "https:\/\/some.vhost.local\/remote.php\/dav\/files\/XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX\/",
						"__class__": "Sabre\\HTTP\\Request"
					}, {
						"__class__": "Sabre\\HTTP\\Response"
					}
				]
			}, {
				"file": "\/var\/www\/some.vhost.local\/ftp\/www\/apps\/dav\/lib\/Server.php",
				"line": 301,
				"function": "exec",
				"class": "Sabre\\DAV\\Server",
				"type": "->",
				"args": []
			}, {
				"file": "\/var\/www\/some.vhost.local\/ftp\/www\/apps\/dav\/appinfo\/v2\/remote.php",
				"line": 35,
				"function": "exec",
				"class": "OCA\\DAV\\Server",
				"type": "->",
				"args": []
			}, {
				"file": "\/var\/www\/some.vhost.local\/ftp\/www\/remote.php",
				"line": 163,
				"args": ["\/var\/www\/some.vhost.local\/ftp\/www\/apps\/dav\/appinfo\/v2\/remote.php"],
				"function": "require_once"
			}
		],
		"File": "\/var\/www\/some.vhost.local\/ftp\/www\/apps\/user_ldap\/lib\/User_LDAP.php",
		"Line": 437,
		"CustomMessage": "--"
	},
	"userAgent": "Mozilla\/5.0 (Windows) mirall\/2.5.1final (build 20181204) (Nextcloud)",
	"version": "15.0.7.0"
}

Steps to reproduce

  1. Have Nextcloud 13.0.4 with LDAP users, update to 15.0.7
  2. ???
  3. Profit !

Expected behaviour

I guess there should be only one GUID in the error message.
The args for function getHome is another GUID.

Server configuration

Operating system: CentOS 7 x64 1810 uptodate

Web server: Apache 2.4.6-88

Database: MariaDB 5.5.60-1

PHP version: PHP 7.1.8-1

Nextcloud version: 15.0.7

Updated from an older Nextcloud/ownCloud or fresh install: Updated from 13.0.4 to 14 latest then to 15.0.7

Where did you install Nextcloud from: (via web update)

List of activated apps:

App list
Enabled:
  - accessibility: 1.1.0
  - activity: 2.8.2
  - calendar: 1.6.4
  - cloud_federation_api: 0.1.0
  - comments: 1.5.0
  - dav: 1.8.1
  - deck: 0.5.2
  - federatedfilesharing: 1.5.0
  - federation: 1.5.0
  - files: 1.10.0
  - files_external: 1.6.0
  - files_pdfviewer: 1.4.0
  - files_sharing: 1.7.0
  - files_texteditor: 2.7.0
  - files_trashbin: 1.5.0
  - files_versions: 1.8.0
  - files_videoplayer: 1.4.0
  - firstrunwizard: 2.4.0
  - gallery: 18.2.0
  - groupfolders: 2.0.4
  - logreader: 2.0.0
  - lookup_server_connector: 1.3.0
  - nextcloud_announcements: 1.4.0
  - notifications: 2.3.0
  - oauth2: 1.3.0
  - onlyoffice: 2.1.6
  - password_policy: 1.5.0
  - provisioning_api: 1.5.0
  - serverinfo: 1.5.0
  - sharebymail: 1.5.0
  - sharerenamer: 2.6.0
  - spreed: 5.0.3
  - support: 1.0.0
  - survey_client: 1.3.0
  - systemtags: 1.5.0
  - tasks: 0.9.8
  - theming: 1.6.0
  - twofactor_backupcodes: 1.4.1
  - updatenotification: 1.5.0
  - user_ldap: 1.5.0
  - workflowengine: 1.5.0

Nextcloud configuration:

Config report
If you have access to your command line run e.g.:
sudo -u www-data php occ config:list system
from within your Nextcloud installation folder

or 

Insert your config.php content here. 
Make sure to remove all sensitive content such as passwords. (e.g. database password, passwordsalt, secret, smtp password, …)

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

Are you using encryption: No

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

LDAP configuration (delete this part if not used)

LDAP config
| Configuration                 | s01                                                                                                                                                                                                                                        |
+-------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| hasMemberOfFilterSupport      | 1                                                                                                                                                                                                                                          |
| homeFolderNamingRule          | attr:sAMAccountName                                                                                                                                                                                                                        |
| lastJpegPhotoLookup           | 0                                                                                                                                                                                                                                          |
| ldapAgentName                 | CN=Compte AD ,OU=Utilisateurs speciaux,DC=domaine,DC=local                                                                                                                                                                           |
| ldapAgentPassword             | ***                                                                                                                                                                                                                                        |
| ldapAttributesForGroupSearch  |                                                                                                                                                                                                                                            |
| ldapAttributesForUserSearch   |                                                                                                                                                                                                                                            |
| ldapBackupHost                |                                                                                                                                                                                                                                            |
| ldapBackupPort                |                                                                                                                                                                                                                                            |
| ldapBase                      | DC=domaine.local,DC=local                                                                                                                                                                                                                       |
| ldapBaseGroups                | DC=domaine.local,DC=local                                                                                                                                                                                                                       |
| ldapBaseUsers                 | DC=domaine.local,DC=local                                                                                                                                                                                                                       |
| ldapCacheTTL                  | 600                                                                                                                                                                                                                                        |
| ldapConfigurationActive       | 1                                                                                                                                                                                                                                          |
| ldapDefaultPPolicyDN          |                                                                                                                                                                                                                                            |
| ldapDynamicGroupMemberURL     |                                                                                                                                                                                                                                            |
| ldapEmailAttribute            | mail                                                                                                                                                                                                                                       |
| ldapExperiencedAdmin          | 1                                                                                                                                                                                                                                          |
| ldapExpertUUIDGroupAttr       |                                                                                                                                                                                                                                            |
| ldapExpertUUIDUserAttr        |                                                                                                                                                                                                                                            |
| ldapExpertUsernameAttr        |                                                                                                                                                                                                                                            |
| ldapGidNumber                 | gidNumber                                                                                                                                                                                                                                  |
| ldapGroupDisplayName          | cn                                                                                                                                                                                                                                         |
| ldapGroupFilter               |                                                                                                                                                                                                                                            |
| ldapGroupFilterGroups         |                                                                                                                                                                                                                                            |
| ldapGroupFilterMode           | 0                                                                                                                                                                                                                                          |
| ldapGroupFilterObjectclass    |                                                                                                                                                                                                                                            |
| ldapGroupMemberAssocAttr      | uniqueMember                                                                                                                                                                                                                               |
| ldapHost                      | somedomaincontroller.domaine.local.local                                                                                                                                                                                                                  |
| ldapIgnoreNamingRules         |                                                                                                                                                                                                                                            |
| ldapLoginFilter               | (&(&(|(objectclass=person))(!(UserAccountControl:1.2.840.113556.1.4.804:=34))(|(|(memberof=CN=Utilisateurs N,OU=Groupes,DC=domaine.local,DC=local)(primaryGroupID=18134))))(|(samaccountname=%uid)(|(mailPrimaryAddress=%uid)(mail=%uid)))) |
| ldapLoginFilterAttributes     |                                                                                                                                                                                                                                            |
| ldapLoginFilterEmail          | 1                                                                                                                                                                                                                                          |
| ldapLoginFilterMode           | 1                                                                                                                                                                                                                                          |
| ldapLoginFilterUsername       | 1                                                                                                                                                                                                                                          |
| ldapNestedGroups              | 0                                                                                                                                                                                                                                          |
| ldapOverrideMainServer        | 0                                                                                                                                                                                                                                          |
| ldapPagingSize                | 500                                                                                                                                                                                                                                        |
| ldapPort                      | 389                                                                                                                                                                                                                                        |
| ldapQuotaAttribute            |                                                                                                                                                                                                                                            |
| ldapQuotaDefault              |                                                                                                                                                                                                                                            |
| ldapTLS                       | 0                                                                                                                                                                                                                                          |
| ldapUserAvatarRule            | default                                                                                                                                                                                                                                    |
| ldapUserDisplayName           | displayname                                                                                                                                                                                                                                |
| ldapUserDisplayName2          |                                                                                                                                                                                                                                            |
| ldapUserFilter                | (&(|(objectclass=person))(!(UserAccountControl:1.2.840.113556.1.4.804:=34))(|(|(memberof=CN=Utilisateurs Nextcloud,OU=Groupes,DC=domaine.local,DC=local)(primaryGroupID=18134))))                                                                   |
| ldapUserFilterGroups          | Utilisateurs Nextcloud                                                                                                                                                                                                                         |
| ldapUserFilterMode            | 1                                                                                                                                                                                                                                          |
| ldapUserFilterObjectclass     | person                                                                                                                                                                                                                                     |
| ldapUuidGroupAttribute        | auto                                                                                                                                                                                                                                       |
| ldapUuidUserAttribute         | auto                                                                                                                                                                                                                                       |
| turnOffCertCheck              | 0                                                                                                                                                                                                                                          |
| turnOnPasswordChange          | 0                                                                                                                                                                                                                                          |
| useMemberOfToDetectMembership | 1                                                                                                                                                                                                                                          |
+-------------------------------+-----------------------------------

Client configuration

Browser: Opera 58.0.3135.127

Operating system: Windows 10 x64 1810

Logs

Web server error log

No webserver errors, only standard logs

XX.XX.XX.XX - - [18/Apr/2019:15:37:47 +0200] "PROPFIND /remote.php/dav/files/6A058A00-A3DB-4F35-8C9C-9FED2B24EA13/ HTTP/1.1" 207 274 "-" "Mozilla/5.0 (Windows) mirall/2.5.1final (build 20181204) (Nextcloud)"

Nextcloud log (data/nextcloud.log)

Nextcloud log Please find log JSFormatted above.

Browser log

Browser log Not relevant.

Client log

Client log ``` [OCC::SyncEngine::startSync #### Discovery start #################################################### [OCC::SyncEngine::startSync Server "15.0.7.0" [csync_update ## Starting local discovery ## [_csync_detect_update ._sync_459682522672.db excluded (1) [_csync_detect_update ._sync_459682522672.db-shm excluded (1) [_csync_detect_update ._sync_459682522672.db-wal excluded (1) [_csync_detect_update Desktop.ini excluded (1) [csync_ftw <= Closing walk for C:/Users/User/Nextcloud2 with read_from_db 0 [csync_update Update detection for local replica took 0 seconds walking 0 files [csync_update ## Starting remote discovery ## [OCC::AccessManager::createRequest 6 "PROPFIND" "https://some.vhost.local/remote.php/dav/files/XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX/" has X-Request-ID "299c710e-dd76-4432-99a1-6fdb3d3d14eb" [OCC::AbstractNetworkJob::start OCC::LsColJob created for "https://some.vhost.local" + "" "OCC::DiscoverySingleDirectoryJob" [OCC::WebFlowCredentials::slotFinished request finished [OCC::WebFlowCredentials::stillValid Still valid? [OCC::WebFlowCredentials::stillValid QNetworkReply::NetworkError(NoError) [OCC::WebFlowCredentials::stillValid "Erreur inconnue" [OCC::JsonApiJob::finished JsonApiJob of QUrl("https://some.vhost.local/ocs/v2.php/apps/notifications/api/v2/notifications?format=json") FINISHED WITH STATUS "OK" [OCC::JsonApiJob::finished Nothing changed so nothing to retrieve - status code: 304 [OCC::ServerNotificationHandler::slotNotificationsReceived Status code 304 Not Modified - No new notifications. [OCC::WebFlowCredentials::slotFinished request finished [OCC::WebFlowCredentials::stillValid Still valid? [OCC::WebFlowCredentials::stillValid QNetworkReply::NetworkError(NoError) [OCC::WebFlowCredentials::stillValid "Erreur inconnue" [OCC::LsColJob::finished LSCOL of QUrl("https://some.vhost.local/remote.php/dav/files/XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX/") FINISHED WITH STATUS "OK" [OCC::DiscoverySingleDirectoryJob::directoryListingIteratedSlot Missing properties: "0-- Hébergement --0" 2 0 1555594867 "DNVS" "" "-0000001ocbsqudz0nu2" [csync_ftw opendir failed for - errno 10011 [OCC::SyncEngine::handleSyncError ERROR during csync_update : "Une erreur de transmission HTTP s'est produite. Données manquantes dans la réponse à la découverte du fichier sur le serveur " [OCC::ActivityWidget::addError Item "Nextcloud2" retrieved resulted in "Une erreur de transmission HTTP s'est produite. Données manquantes dans la réponse à la découverte du fichier sur le serveur " [OCC::ActivityListModel::addErrorToActivityList Error successfully added to the notification list: "Une erreur de transmission HTTP s'est produite. Données manquantes dans la réponse à la découverte du fichier sur le serveur " [OCC::SyncJournalDb::close Closing DB "C:/Users/User/Nextcloud2/._sync_459682522672.db" [OCC::SyncEngine::finalize CSync run took 505 ms [OCC::Folder::slotSyncFinished Client version 2.5.1final (build 20181204) Qt 5.11.1 SSL OpenSSL 1.0.1h 5 Jun 2014 [OCC::Folder::slotSyncFinished SyncEngine finished with ERROR [OCC::Folder::showSyncResultPopup Folder sync result: 2 [OCC::Folder::slotSyncFinished the last 4 syncs failed [OCC::SocketListener::sendMessage Sending SocketAPI message --> "UPDATE_VIEW:C:\\Users\\User\\Nextcloud2" to QLocalSocket(0x1d34da1eca0) [OCC::SocketListener::sendMessage Sending SocketAPI message --> "UPDATE_VIEW:C:\\Users\\User\\Nextcloud2" to QLocalSocket(0x1d34da1ea60) [OCC::SocketListener::sendMessage Sending SocketAPI message --> "UPDATE_VIEW:C:\\Users\\User\\Nextcloud2" to QLocalSocket(0x1d34da1eb40) [OCC::ownCloudGui::slotSyncStateChange Sync state changed for folder "https://some.vhost.local/remote.php/dav/files/XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX/" : "Error" [OCC::FolderMan::slotFolderSyncFinished <========== Sync finished for folder [Nextcloud2] of account [[email protected]] with remote [https://some.vhost.local/remote.php/dav/files/XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX/] ```
@deajan deajan added 0. Needs triage Pending check for reproducibility or if it fits our roadmap bug labels Apr 18, 2019
@deajan
Copy link
Author

deajan commented Apr 19, 2019

Tried to find some mapping issues in the database, but didn't find anything suspicous:
SELECT * FROM oc_ldap_user_mapping WHERE owncloud_name != directory_uuid;
0 results.

@deajan
Copy link
Author

deajan commented May 7, 2019

Okay, I finally found the issue (using phpMyAdmin to make whole searches of the offending GUIDs in database).

As it happens, when the oc_share table contains a share from a non existing GUID (in my case, a deleted LDAP account), the upper reported error appears and the sync client cannot work anymore, and a lot of messages spam the nextcloud log.
This is a regression from NC13 where the same configuration worked flawlessly.

Once I executed the following statement, everything worked fine again (where XX guid is existing user and YY guid is deleted user as in the above logs):

DELETE * FROM oc_share WHERE share_with = 'XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX' AND uid_initiator = 'YYYYYYYY-YYYY-YYYY-YYYY-YYYYYYYYYYYY';

Fearing of updating other NC instances that have deleted users which shared content.
Any fix in sight ?

Best regards.

@deajan deajan changed the title After migration, everything works except for one LDAP user NC15 bug, client does not work for users which have shared files from deleted LDAP users May 7, 2019
@deajan
Copy link
Author

deajan commented May 14, 2019

I got this problem for every user which has shared files / folders from disabled / non-existent accounts.
Isn't that supposed to be quite a blocker ?

@TheLastProject
Copy link
Contributor

I can reproduce this issue on Nextcloud 15.0.8 when we removed an user from the group used in Nextcloud's LDAP filter who was sharing files with another user. It also causes these files to continuously show in the Nextcloud web client as if shared "just now" with a size of 0kb.

I've anonymized the below logs:
removed_user = The user who no longer matches the LDAP filter (removed from group or deleted)
broken_user = The user whose sync client got broken

When temporarily readding the account to the group for testing, the sync client worked again. If an user gets disabled but remains in the group, Nextcloud correctly sees them as disabled and this bug isn't triggered.

{no app in context} {"Exception":"OC\\User\\NoUserException","Message":"removed_user is not a valid user anymore","Code":0,"Trace":[{"function":"getHome","class":"OCA\\User_LDAP\\User_LDAP","type":"->","args":["removed_user"]},{"file":"\/var\/www\/nextcloud\/apps\/user_ldap\/lib\/User_Proxy.php","line":108,"function":"call_user_func_array","args":[[{"__class__":"OCA\\User_LDAP\\User_LDAP"},"getHome"],["removed_user"]]},{"file":"\/var\/www\/nextcloud\/apps\/user_ldap\/lib\/Proxy.php","line":150,"function":"callOnLastSeenOn","class":"OCA\\User_LDAP\\User_Proxy","type":"->","args":["removed_user","getHome",["removed_user"],false]},{"file":"\/var\/www\/nextcloud\/apps\/user_ldap\/lib\/User_Proxy.php","line":227,"function":"handleRequest","class":"OCA\\User_LDAP\\Proxy","type":"->","args":["removed_user","getHome",["removed_user"]]},{"file":"\/var\/www\/nextcloud\/lib\/private\/User\/User.php","line":282,"function":"getHome","class":"OCA\\User_LDAP\\User_Proxy","type":"->","args":["removed_user"]},{"file":"\/var\/www\/nextcloud\/lib\/private\/Files\/Storage\/Home.php","line":53,"function":"getHome","class":"OC\\User\\User","type":"->","args":[]},{"file":"\/var\/www\/nextcloud\/lib\/private\/Files\/Mount\/MountPoint.php","line":147,"function":"__construct","class":"OC\\Files\\Storage\\Home","type":"->","args":[{"user":{"__class__":"OC\\User\\User"}}]},{"file":"\/var\/www\/nextcloud\/lib\/private\/Files\/Mount\/MountPoint.php","line":172,"function":"createStorage","class":"OC\\Files\\Mount\\MountPoint","type":"->","args":[]},{"file":"\/var\/www\/nextcloud\/lib\/private\/Files\/Filesystem.php","line":321,"function":"getStorage","class":"OC\\Files\\Mount\\MountPoint","type":"->","args":[]},{"file":"\/var\/www\/nextcloud\/lib\/private\/Files\/Filesystem.php","line":443,"function":"getStorage","class":"OC\\Files\\Filesystem","type":"::","args":["removed_user"]},{"file":"\/var\/www\/nextcloud\/apps\/files_sharing\/lib\/SharedStorage.php","line":127,"function":"initMountPoints","class":"OC\\Files\\Filesystem","type":"::","args":["removed_user"]},{"file":"\/var\/www\/nextcloud\/apps\/files_sharing\/lib\/SharedStorage.php","line":482,"function":"init","class":"OCA\\Files_Sharing\\SharedStorage","type":"->","args":[]},{"file":"\/var\/www\/nextcloud\/lib\/private\/Files\/Storage\/Wrapper\/Jail.php","line":220,"function":"getWrapperStorage","class":"OCA\\Files_Sharing\\SharedStorage","type":"->","args":[]},{"file":"\/var\/www\/nextcloud\/apps\/files_sharing\/lib\/SharedStorage.php","line":199,"function":"getPermissions","class":"OC\\Files\\Storage\\Wrapper\\Jail","type":"->","args":[""]},{"file":"\/var\/www\/nextcloud\/lib\/private\/Files\/Storage\/Wrapper\/Wrapper.php","line":215,"function":"getPermissions","class":"OCA\\Files_Sharing\\SharedStorage","type":"->","args":[""]},{"file":"\/var\/www\/nextcloud\/apps\/files_sharing\/lib\/Cache.php","line":148,"function":"getPermissions","class":"OC\\Files\\Storage\\Wrapper\\Wrapper","type":"->","args":[""]},{"file":"\/var\/www\/nextcloud\/apps\/files_sharing\/lib\/Cache.php","line":114,"function":"formatCacheEntry","class":"OCA\\Files_Sharing\\Cache","type":"->","args":[{"__class__":"OC\\Files\\Cache\\CacheEntry"},""]},{"file":"\/var\/www\/nextcloud\/lib\/private\/Files\/FileInfo.php","line":359,"function":"get","class":"OCA\\Files_Sharing\\Cache","type":"->","args":[""]},{"file":"\/var\/www\/nextcloud\/lib\/private\/Files\/FileInfo.php","line":206,"function":"updateEntryfromSubMounts","class":"OC\\Files\\FileInfo","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"\/var\/www\/nextcloud\/lib\/private\/Files\/Node\/Node.php","line":189,"function":"getMTime","class":"OC\\Files\\FileInfo","type":"->","args":[]},{"file":"\/var\/www\/nextcloud\/apps\/dav\/lib\/Connector\/Sabre\/Node.php","line":158,"function":"getMTime","class":"OC\\Files\\Node\\Node","type":"->","args":[]},{"file":"\/var\/www\/nextcloud\/3rdparty\/sabre\/dav\/lib\/DAV\/CorePlugin.php","line":790,"function":"getLastModified","class":"OCA\\DAV\\Connector\\Sabre\\Node","type":"->","args":[]},{"file":"\/var\/www\/nextcloud\/3rdparty\/sabre\/dav\/lib\/DAV\/PropFind.php","line":98,"function":"Sabre\\DAV\\{closure}","class":"Sabre\\DAV\\CorePlugin","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"\/var\/www\/nextcloud\/3rdparty\/sabre\/dav\/lib\/DAV\/CorePlugin.php","line":794,"function":"handle","class":"Sabre\\DAV\\PropFind","type":"->","args":["{DAV:}getlastmodified",{"__class__":"Closure"}]},{"function":"propFind","class":"Sabre\\DAV\\CorePlugin","type":"->","args":[{"__class__":"Sabre\\DAV\\PropFind"},{"__class__":"OCA\\DAV\\Files\\FilesHome"}]},{"file":"\/var\/www\/nextcloud\/3rdparty\/sabre\/event\/lib\/EventEmitterTrait.php","line":105,"function":"call_user_func_array","args":[[{"__class__":"Sabre\\DAV\\CorePlugin"},"propFind"],[{"__class__":"Sabre\\DAV\\PropFind"},{"__class__":"OCA\\DAV\\Files\\FilesHome"}]]},{"file":"\/var\/www\/nextcloud\/3rdparty\/sabre\/dav\/lib\/DAV\/Server.php","line":1059,"function":"emit","class":"Sabre\\Event\\EventEmitter","type":"->","args":["propFind",[{"__class__":"Sabre\\DAV\\PropFind"},{"__class__":"OCA\\DAV\\Files\\FilesHome"}]]},{"file":"\/var\/www\/nextcloud\/3rdparty\/sabre\/dav\/lib\/DAV\/Server.php","line":981,"function":"getPropertiesByNode","class":"Sabre\\DAV\\Server","type":"->","args":[{"__class__":"Sabre\\DAV\\PropFind"},{"__class__":"OCA\\DAV\\Files\\FilesHome"}]},{"file":"\/var\/www\/nextcloud\/3rdparty\/sabre\/dav\/lib\/DAV\/Server.php","line":1666,"function":"getPropertiesIteratorForPath","class":"Sabre\\DAV\\Server","type":"->","args":["files\/broken_user",["{DAV:}getlastmodified"],0]},{"file":"\/var\/www\/nextcloud\/3rdparty\/sabre\/dav\/lib\/DAV\/CorePlugin.php","line":355,"function":"generateMultiStatus","class":"Sabre\\DAV\\Server","type":"->","args":[{"__class__":"Generator"},false]},{"function":"httpPropFind","class":"Sabre\\DAV\\CorePlugin","type":"->","args":[{"absoluteUrl":"https:\/\/nextcloud.example.com\/remote.php\/dav\/files\/broken_user\/","__class__":"Sabre\\HTTP\\Request"},{"__class__":"Sabre\\HTTP\\Response"}]},{"file":"\/var\/www\/nextcloud\/3rdparty\/sabre\/event\/lib\/EventEmitterTrait.php","line":105,"function":"call_user_func_array","args":[[{"__class__":"Sabre\\DAV\\CorePlugin"},"httpPropFind"],[{"absoluteUrl":"https:\/\/nextcloud.example.com\/remote.php\/dav\/files\/broken_user\/","__class__":"Sabre\\HTTP\\Request"},{"__class__":"Sabre\\HTTP\\Response"}]]},{"file":"\/var\/www\/nextcloud\/3rdparty\/sabre\/dav\/lib\/DAV\/Server.php","line":479,"function":"emit","class":"Sabre\\Event\\EventEmitter","type":"->","args":["method:PROPFIND",[{"absoluteUrl":"https:\/\/nextcloud.example.com\/remote.php\/dav\/files\/broken_user\/","__class__":"Sabre\\HTTP\\Request"},{"__class__":"Sabre\\HTTP\\Response"}]]},{"file":"\/var\/www\/nextcloud\/3rdparty\/sabre\/dav\/lib\/DAV\/Server.php","line":254,"function":"invokeMethod","class":"Sabre\\DAV\\Server","type":"->","args":[{"absoluteUrl":"https:\/\/nextcloud.example.com\/remote.php\/dav\/files\/broken_user\/","__class__":"Sabre\\HTTP\\Request"},{"__class__":"Sabre\\HTTP\\Response"}]},{"file":"\/var\/www\/nextcloud\/apps\/dav\/lib\/Server.php","line":301,"function":"exec","class":"Sabre\\DAV\\Server","type":"->","args":[]},{"file":"\/var\/www\/nextcloud\/apps\/dav\/appinfo\/v2\/remote.php","line":35,"function":"exec","class":"OCA\\DAV\\Server","type":"->","args":[]},{"file":"\/var\/www\/nextcloud\/remote.php","line":163,"args":["\/var\/www\/nextcloud\/apps\/dav\/appinfo\/v2\/remote.php"],"function":"require_once"}],"File":"\/var\/www\/nextcloud\/apps\/user_ldap\/lib\/User_LDAP.php","Line":437,"CustomMessage":"--"}

@deajan
Copy link
Author

deajan commented Jun 21, 2019

Good to know it can be reproduced :)
Guess there should exist a "replace share owner by anonymous" or something like that in order to mitigate that issue.
Indeed, I could keep disabled users in groups, but having bigger ADs, this is a slow down solution.

Thanks for your insight.

@deajan
Copy link
Author

deajan commented Jul 19, 2019

Any news ? IMHO this seems to be a blocker for everyone having LDAP accounts.

@deajan
Copy link
Author

deajan commented Oct 3, 2019

This bug still exists on v15.0.12... Please consider a workaround or a fix.

@deajan
Copy link
Author

deajan commented Jan 23, 2020

Related to #17717 and #11551.

Closing this one.

@deajan deajan closed this as completed Jan 23, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
0. Needs triage Pending check for reproducibility or if it fits our roadmap bug feature: install and update feature: ldap
Projects
None yet
Development

No branches or pull requests

4 participants