Is your share mounted automatically upon boot? Where is the mount directory store? What permissions you have in your share?
Are you using a Redis for file locking?
I believed i dont have redis for file locking, I have shared folder from other server and im using external storages with SMB/CIFS they have write/read permissions and i specify of each user account.
anyway
the command you gave to me is really really helpful, and you are right it tooks so long to finish scanning 1 users out of 39, 4 hours still not yet finish and i dont have idea whats going on if i run this command sudo -u www-data php occ files:scan --all, thank you for the link of manual its very helpful.
i added --versbose so that i can able to see what files scanning and also i changed --all to specific user account
sudo -u www-data php occ files:scan --verbose --all <— to scan all users
sudo -u www-data php occ files:scan --verbose adminroot <— specific user only