1

I have a fileserver running Debian 9.0 with samba server (v. 4.5.8). When I connect from a Windows PC everything works fine, but when I connect from a MacOS (tried from Mountain Lion and Sierra) almost every file that is copied to that share is grayed out (like an incomplete download). While CR2s, PDFs and TTFs are grayed out, AIs and PSDs are not. On the SMB I use fruit module to speed up access from Apple computers. That works great, without it access speed is a lot more slower, but no more grayed out files.

My SMB config:

[global]
    workgroup = COMPANY
    netbios name = DATACENTER
    server string = Datacenter
    security = user
    log level = 1
    read raw = No
    write raw = No
    max xmit = 65536
    case sensitive = no

    fruit:aapl = yes
    fruit:resource = xattr
    fruit:veto_appledouble = yes
    readdir_attr:aapl_max_access = no
    fruit:metadata = stream

    socket options = TCP_NODELAY IPTOS_LOWDELAY IPTOS_THROUGHPUT SO_SNDBUF=65535 SO_RCVBUF=32768
    unix extensions = no

[Share]
    comment = Share
    browseable = false
    null passwords = true
    path = /home/raid/
    read only = No
    guest ok = No
    create mask = 775
    vfs object = recycle catia fruit streams_xattr
    config-file = /etc/samba/recycle.conf
    recycle:repository = --==Recycle==--
    recycle:keeptree = yes
    recycle:versions = yes
    valid users = user

So when I disable the whole fruit module, it works, but it's very slow (only from Apple). I've tried to change the fruit:resource to file, also enabled aapl_max_access, but no luck.

Additinal info: Enabling log level 10 on fruit module get me a logfile, where there are these errors:

reading meta xattr for filename.exet, rc: -1
error reading AppleDouble for filename.ext
ad_get(meta) for filename.ext returning -1

Maybe this could be the problem?

PS.: The file system is:

/dev/sda1 on /home/raid type ext4 (rw,noatime,nodiratime,data=ordered)

fstab:

RAID

UUID=1346a8d6-5611-4b35-9ca0-98638b9d515a /home/raid ext4 defaults,user_xattr,noatime,nodiratime 0 2

2
  • What filesystem are you using on the filesystem in question (/home/raid)? Have you enable xattr on it?
    – mjturner
    Dec 8, 2017 at 9:32
  • @mjturner: Thanks for your reply. I've updated the question.
    – Fenistil
    Feb 14, 2018 at 15:44

1 Answer 1

2

I’ve seen exactly this problem very recently - it’s caused by the ordering of your VFS modules. When recycle is used in conjunction with fruit, it must always come after them (in fact, other than when using asynchronous I/O modules, recycle should always come last).

A similar bug has been filed against FreeNAS. The important part:

The interaction between recycle and fruit / streams_xattr requires recycle to come after them. Otherwise, you will run into what appears to be attribute or permission errors.

My problem occurred when using Samba 4.5 on Linux (with ZFS as the underlying filesystem), but the OS version and filesystem don’t appear to be significant.

The correct entry in your share configuration should read:

vfs objects = catia fruit streams_xattr recycle

Once you correct it you may find that files copied before you correct the vfs objects order are still greyed out. If that’s the case, remove any extended attributes from those files and they should appear correctly in Finder (you can do this using any of the Linux extended attribute tools).

1
  • I can't believe, but it works! Thanks a lot!
    – Fenistil
    Feb 15, 2018 at 8:41

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .