I looked at the Apple SMB client source. They detect copy-chunk support via a compounded SMB3 request to open root dir of share / issue ioctl to get offload token / close when the share is first mounted. This is a pretty bad test since typically SMB servers treat ioctl requests as requiring async offload and send an interim response to the client. The SMB protocol requires that compounded requests like this fail if they require going async. Therefore, it always fails against Samba, and possibly also against Windows. I think it’s probably OK to work around the bad test by not doing this for the specific ioctl to get an offload token.
This is a google drive link to a patched samba debian file for TrueNAS 25.04.1 (if you install it on an different TrueNAS version you will break your install). This requires install-dev-tools
and then dpkg -i <package>
then restart the SMB service. Don’t try this if you don’t know what you’re doing, and of course don’t do this on a production system at work.
I’ll try to get it into 25.04.2, but will have to also upstream the fix.
NOTE: this doesn’t use fruit:copyfile and doesn’t require fruit.