u/satmandu

macOS 26.5 unable to synchronize changes to remote samba server?

macOS 26.5 unable to synchronize changes to remote samba server?

[Edit: SOLVED It turns out that I had done a zfs clone to create a new dataset that I'm syncing to off-site backup, and had forgotten about switching my samba share to point to that new dataset. So this was entirely my own fault. macos is doing the right thing! and it turns out that with Tahoe 26.5 I no longer even need a /etc/nsmb.conf to connect to the samba server, which is fantastic!]

Sorry all, and thanks for the help troubleshooting.

Steps that helped me figure this out:

  • server side:

    • To figure out if the client was connecting, and also to show what files/folders were being opened from the client: sudo smbstatus

    • To see if there was local disk activity on the server when I was doing the copy over the network: sudo iostat

    • To see if my zpool was having any activity when I was doing the copy over the network (obviously only useful if you use zfs and are writing to a zpool): zpool iostat 1

  • Mac side:

    • I didn't see any smb usage when I ran this and did a copy to the share: sudo fs_usage -f network -e `pgrep -f Google | xargs` `pgrep -f Fifefox | xargs`

    • This let me see information about my smb mount: sudo smbstatshares -a

    • I will add that perhaps due to a hackish /etc/nsmb.conf I was using previously, that I was earlier having issues copying to the samba share at all, resulting in what looked like a remnant not-quite-copied folder. I had to use the steps at https://apple.stackexchange.com/a/463951 to get rid of that on the files I was trying to copy to the server:

          function fixFolder {
            file=$1
            mod_date=$(stat -f "%Sm" "$file")
            xattr -drs com.apple.metadata:kMDItemResumableCopy $file
            SetFile -d "$mod_date" "$file"
          }
      

The Original Complaint:

I'm beating my head against the wall over this, and I thought maybe someone else who has experienced this issue could shed some light.

I have an Ubuntu machine with Resolute/26.04 and have tried both the default Samba install and the current Samba version 4.24.2.

I connect from my Mac running 26.5 via smb, and a Samba share mounts just fine.

I can create folders and files on the mounted share, but they never show up on the remove server when I look at the directory on the server.

I can reboot the mac, and reconnect to the server, and the folders and directories I made are still there.

Somehow, macOS is caching the share, but never actually transferring the changes to the server.

I've gone through the gamut of adding all sorts of stuff to the /etc/nsmb.conf file (including not having such a file to leave things at the default).

Nothing changes. Files I add on the server do not show up on the client, and files I add on the client do not show up on the server.

Somehow, macOS is creating a cached representation of the share that never updates.

Any ideas on how to disable that caching or force a sync?

There are no ._DS_Store files in the relevant directories, for what it is worth, and yes, I have defaults write com.apple.desktopservices DSDontWriteNetworkStores -bool TRUE set.

It shouldn't matter what the Samba settings are on the server, right? If someone can modify a Samba server to trick a client into thinking that it is reading and writing to the server when it isn't, that is a huge problem.

u/satmandu — 2 days ago