SMB Share and failed write from macOS

Hi Team, read works, but write fails, I get this error in the logs

Wed May 29 16:14:00 2024 daemon.err smbd[14486]: [2024/05/29 16:14:00.472911, 0] ../../source3/modules/vfs_fruit.c:2576(fruit_pwrite_meta_netatalk)
Wed May 29 16:14:00 2024 daemon.err smbd[14486]: fruit_pwrite_meta_netatalk: ad_pwrite [pubkey.txt:AFP_AfpInfo] failed

Seems something related to extra metadata that macOS is trying to write ?
Any fix for this ?

GL-MT2500 with v4.5.16 firmware in bridged network mode.
USB Drive has exFAT filesystem.

exFAT does not support macOS metadata, I would assume this is the issue.

What filesystem do you suggest then ?
I have tested the USB stick on a Mac and no issues, I can write files.
Has the SMB server been tested from a Mac and if so what is the recommended setup in terms of filesystem, partition type, size, etc ?

I have reformatted the USB stick, reset the router firmware and setup Network Share again.
I get same error copying from Finder, but I also tested in commandline and it appeared to be working, but then at the end I get an error

could not copy extended attributes to /Volumes/shared/dvd.iso: Attribute not found

We have tested on Windows, iOS, Android, Linux (Ubuntu, etc.), and they all work ok.

Mac also based on Linux, but it depends on its Samba client with own developed codes: samba/source3/modules/vfs_fruit.c at master · samba-team/samba · GitHub

Probably 'vfs' compatibility not very well, please try:
go to GL router smb server configuration on command line, group 'global', add this one option (original is yes):

fruit:nfs_aces = no

(source: Creating a directory in Samba share from OSX client always has ACL "mask:r-x" - Unix & Linux Stack Exchange)

Hi Bruce, I just check the file /etc/samba/smb.conf.template it has the following set by default;

    fruit:nfs_aces = no
    fruit:aapl = yes
    vfs objects = catia fruit streams_xattr

I find this file gets overwritten when setting up a samba share again. I edited the /var/etc/smb.conf file instead and re-started SMB service to test again with these settings;

    fruit:nfs_aces = yes
    fruit:aapl = yes
    vfs objects = catia fruit streams_xattr

Now I can create multiple folders in finder and that works, but copying files fails again in finder, creating a zero byte file.
The operation can’t be completed because an unexpected error occurred (error code -50).

Testing from command line on Mac to copy does copy the file, but again shows extended attributes error on completion.

Re-formatted the USB to ext4 and tested again, working as expected now.
Basically, can't user exFAT on Samba share to a Mac, exFAT does not support extended attributes (xattrs), which are needed for vfs_streams_xattr to function properly

1 Like