[Samba] File copy with macOS Finder leaves random files grayed out using vfs_fruit

Thomas Hukkelberg thomas at hovedkvarteret.no
Tue Oct 20 19:01:52 UTC 2020


Hi all,

We use the vfs_fruit module and lately we have experienced that random files copied with Finder are being grayed out. We think this is probably due to the extended attribute "user.DosStream.AFP_AfpInfo:$DATA" not being updated/removed after the file is copied. If we manually remove the xattr in question with the command setfattr -d 'user.DosStream.AFP_AfpInfo:$DATA', the file becomes 'available' to macOS users. All data in the file is ok, the problem is solely the extended attributes that Finder sets during copy. Occurs on macOS High Sierra (10.13), Mojave (10.14) and Catalina (10.15).


In log.smbd we see the following errors:

[2020/10/19 14:49:08.694441,  0] ../../source3/modules/vfs_fruit.c:2200(fruit_pread_meta_stream)
  fruit_pread_meta_stream: Removing [Endclient/2020/20260_projectname/Icons/filename_icon_v3.ai:AFP_AfpInfo] after short read [0]
[2020/10/19 14:49:08.695018,  0] ../../source3/modules/vfs_fruit.c:2208(fruit_pread_meta_stream)
  fruit_pread_meta_stream: Removing [Endclient/2020/20260_projectname/Icons/filename_icon_v3.ai:AFP_AfpInfo] failed
[2020/10/19 14:49:08.779410,  0] ../../source3/modules/vfs_fruit.c:2200(fruit_pread_meta_stream)
  fruit_pread_meta_stream: Removing [Endclient/2020/20260_projectname/Icons/filename_icon_v3.svg:AFP_AfpInfo] after short read [0]
[2020/10/19 14:49:08.779772,  0] ../../source3/modules/vfs_fruit.c:2208(fruit_pread_meta_stream)
  fruit_pread_meta_stream: Removing [Endclient/2020/20260_projectname/Icons/filename_icon_v3.svg:AFP_AfpInfo] failed
[2020/10/19 14:49:08.859609,  0] ../../source3/modules/vfs_fruit.c:2200(fruit_pread_meta_stream)
  fruit_pread_meta_stream: Removing [Endclient/2020/20260_projectname/Rebalance_icon.pptx:AFP_AfpInfo] after short read [0]
[2020/10/19 14:49:08.859959,  0] ../../source3/modules/vfs_fruit.c:2208(fruit_pread_meta_stream)
  fruit_pread_meta_stream: Removing [Endclient/2020/20260_projectname/Rebalance_icon.pptx:AFP_AfpInfo] failed
[2020/10/19 14:49:09.655440,  0] ../../source3/modules/vfs_fruit.c:2200(fruit_pread_meta_stream)
  fruit_pread_meta_stream: Removing [Endclient/2020/20260_projectname/Rebalance_icon.pptx:AFP_AfpInfo] after short read [0]
[2020/10/19 14:49:09.656351,  0] ../../source3/modules/vfs_fruit.c:2208(fruit_pread_meta_stream)
  fruit_pread_meta_stream: Removing [Endclient/2020/20260_projectname/Rebalance_icon.pptx:AFP_AfpInfo] failed


After changing the fruit config to use netatalk compatible metadata/resource the error messages are gone from log.smbd, but we still experience problems with random files being grayed out. We have also tried altering the order of vfs objects to no avail.

We run Samba with CTDB in LXC containers utilizing CephFS storage. Samba is version 4.12.8-SerNet-Ubuntu-8.focal running on ubuntu 20.04 in Proxmox LXCs and Ceph is version 14.2.11 also running on Proxmox 6.2.

We are a bit lost and struggle to find exactly what’s causing vfs_fruit to being unable to remove the FinderInfo extended attributes after successful file copy. Is there any issues using vfs_fruit with cephfs? Or is it because we use samba in containers?

Any suggestions or pointers how to solve this issue would be welcome! :)


--

smb.conf is as follows:

[global]
  workgroup = STORAGE
  netbios name = STORAGE
  realm = AD.STORAGE.NET
  security = ADS
  idmap config * : backend = autorid
  idmap config * : range = 10000-24999999
  map acl inherit = Yes

  bind interfaces only = yes
  interfaces = lo eth1
  passdb backend = tdbsam
  username map = /etc/samba/user.map

  smbd: backgroundqueue = no
  clustering = yes
  ctdbd socket = /run/ctdb/ctdbd.socket

  winbind use default domain = yes
  winbind enum users = yes
  winbind enum groups = yes

  vfs objects = catia fruit streams_xattr acl_xattr recycle
#  vfs objects = acl_xattr catia fruit recycle streams_xattr    #original config
  min protocol = SMB2
  ea support = yes

#  fruit:metadata = stream   #original config
#  fruit:resource = stream   #original config
  fruit:metadata = netatalk
  fruit:resource = xattr

  fruit:model = Xserve
  fruit:posix_rename = yes
  fruit:zero_file_id = yes
  fruit:veto_appledouble = no
  fruit:wipe_intentionally_left_blank_rfork = yes
  fruit:delete_empty_adfiles = yes

  #disable printing
  load printers = no
  printing = bsd
  printcap name = /dev/null
  disable spoolss = yes

  #performance tuning
  socket options = TCP_NODELAY
  aio read size = 1
  aio write size = 1
  min receivefile size = 16384
  use sendfile = true
  max xmit = 65535
  log level = 1
  read raw = yes
  write raw = yes
  dead time = 15
  getwd cache = yes

  #enable spotlight search for macOS
  spotlight backend = elasticsearch
  elasticsearch:address = 127.0.0.1
  elasticsearch:port = 9200


[storage]
  path = /srv/storage
  read only = no
  posix locking = no
  strict locking = no
  oplocks = no
  level2 oplocks = no
  kernel share modes = no
  recycle:repository = .recycle
  recycle:keeptree = yes
  recycle:versions = yes
  spotlight = yes
  elasticsearch:index = storage


--thomas

--
Thomas Hukkelberg
thomas at hovedkvarteret.no



More information about the samba mailing list