Can't delete empty folders from smb storage

Symptom

Some random users can’t delete empty folders from the SMB Storage using the webUI.

Environment

ownCloud 10.5

ownCloud 10.6

Steps to reproduce

This issue happens randomly and there is no way to reproduce it.

The user has permission to write into the SMB share.

Solution/Workaround

occ files:scan <user>