Not all files show under a specific folder


#1

Having an issue where about 8 files are not showing up in a specific folder on Nextcloud. They are physically there when I look at the actual folder. The files are on a CIFS/SMB share we have connected using external storage support. Basically files are on the host Windows 10 box. Nextcloud is running on a VMware image from techandme on this Windows 10 box.

I’ve tried to rename the file still don’t show. Moved it to a different folder still don’t show. Made sure all permissions were reset inside windows for that folder still doesn’t show. I don’t get why it’s not showing these 8 specific files in Nextcloud browser or iOS app. Can’t see much in the log that points me to why It’s not showing up. Any help would be appreciated on what’s causing this.

Nextcloud version 13.0.3
Operating system and version Ubuntu 16.04 (VM techandme)
Apache or nginx version VM Techandme
PHP version VM Techandme

Is this the first time you’ve seen this error? Yes

Steps to replicate it:

  1. Go to folder. Refresh, files are missing
  2. Go to Nextcloud iOS app, go to same folder, files missing.

#2

The problem here is that Nextcloud has cached the list of files/folders in the directory, to reduce the latency when users ask what’s available. It fetches the full file when one is requested, but that navigation is cached.

This caching assumes nothing else is going to change the folder, unless you tell it differently. The admin guide’s SMB/CIFS page has instructions for this. It’ll request for the SMB/CIFS server to notify it when files/folders change, then it will update its cache in batches. If there’s too long between those batches (so that users are noticing the delay), you can look at “Decrease sync delay” to have those run more often without too much overhead.


#3

Thanks for the clarification.

I have each of the shares set with the option of " Check for changes - Once every direct access" So I was assuming it should be doing it each time.

Now to further test this, I created another folder, moved 5 of the files (which I cant see) into that folder. In Nextcloud looked at that new folder, still no files in there. Created a random text file, that shows instantly. So Im leaning on something to do with these files, I dont get why its these specific files, they are all the same extension. Ive also made sure all permissions at the file level the same as I asked Windows to overwrite all child permissions (which I did at the folder level). So not sure if its permissions or something else.

Dixit


#4

Just to close the loop on this mostly, I got it finally to appear (all except one file for some reason) by issuing an “occ files:scan --all” command. Now I see all but one file. May try to run it again, but not sure why still one file missing. Even at one point the other day trashed the entire install, installed Nextcloud from scratch again via techandme image and still same issue, same files were missing.


#5

Ok something definitely not right, I decided to run the command again, and somehow instead of getting that one file back, we just lost 7 files, so back to square one again somehow. So seems like this cache for SMB or something around it is not staying correctly updated. I noticed another folder with even larger amount of files missing that one has over 450files on actual disk, but only showing about 200 of them. Same thing happened on that folder.


#6

Still cant seem to get a handle on why certain files dont show up in folders yet they are physically there. I dont understand why when running the command to scan all files causes it sometimes to pull in the files (yet some are still missing) and then other times to cause massive amount of files missing.

I have the share set to re-scan on access of the share under the actual external file share mount settings.

Any additional troubleshooting help would be appreciated on whats causing this. Im on the latest 13.0.4 and still having the issue