Samba-4.4 doesn't show all files and folders

I just upgraded to Samba-4.4 and I noticed a weird problem. I opened a folder in one of the shares, only to notice a bunch of files and folders are missing. I SSH-ed to the server and looked. And sure enough, all the files and folders are there. Nothing is missing. For some reason, Samba isn't showing all of them.

The weird thing is, if I copy this folder (on the server, with the cp -a command) the copy works fine. All the files and folders are shown. And the permissions are exacly the same.

Does someone know why this is and how to fix it?
 
Today I encountered a slightly different, but possibly related problem. I mounted a share in Mint (Mint-18.0 x64 Cinnamon) and it showed only one folder. I checked the same share with Windows-10 and it showed all files and folders.

Something is not right. But I can't figure out what.
 
One of our Macs had the same issue as I had with Mint-18.0. It turned out, it had tweaked settings, to enforce the use of SMB1, instead of SMB2 or SMB3. After removing the tweak, everything worked fine and all the files were shown.

I'm not sure what Cinnamon uses to mount SMB-shares. But my guess is, it's not SMB3.

So, for some reason, clients that use an older version of SMB seem to be unable to see all the files in a share. Does someone know why that is and how to fix it?
 
I upgraded from Samba-3.6.25_3 to Samba-4.4.5_1

The upgrade itself was pretty straightforward

Code:
# portmaster -o net/samba44 samba36-3.6.25_3
# mv /usr/local/etc/smb.conf /usr/local/etc/smb4.conf
# mv /usr/local/etc/samba/* /var/db/samba4/private/
# service samba_server start

I found those steps here and they seem to have worked well. Well, except for the problems I'm experiencing with older clients.
 
That's a good way to upgrade, but both servers differ in configuration and in some parameters defaults. Is it a domain controller? If not I guess this might help in /usr/local/etc/smb4.conf:
Code:
server min protocol = NT1
I hope you haven't blocked IP port 139 which is used in NT - type connections.
One more thing: if your files are on ZFS volume you should use zfsacl vfs module.
AIO might be related to some file disappearing too.
 
Port 139 is open. And I am using the zfsacl module, like this:
Code:
vfs objects = zfsacl catia fruit streams_xattr

I concidered trying to set an older protocol on the server. But this feels like a cheap workaround, without addressing the real issue. Why are some files shown, while other aren't? As far as I can see, permissions aren't the issue. Maybe SMB3 uses some database or index, that needs to be properly (re)build?
 
Hi, I have been having this exact same problem for the past couple of weeks. I have Samba on my FreeBSD server and my Mac client only sees a partial directory listing. My setup has been working fine for years, surviving many Samba/FreeBSD/Mac updates, but something has happened in the past month for it to break. If I explicitly try and "ls" a folder on my Mac that I know is there but isn't showing then "ls" just hangs and I have to hard-reboot my Mac. Did you ever solve your problem? If so, how?
 
Back
Top