Mac can't copy dot file to SMB share on TrueNAS

Glorious1

Guru
Joined
Nov 23, 2014
Messages
1,211
I'm transitioning from AFP shares to SMB shares for my Macs to access TrueNAS. One problem I run into is failure to copy dot-files to the share. I get this:
The operation can’t be completed because an unexpected error occurred (error code -50).
But I can go into Terminal and use cp to copy it to the mounted share (/Volumes/ . . . ). This was not an issue in AFP.

I've tried toggling the SMB share setting "Enable Alternate Data Streams" and reconnecting to the share, but it didn't help. Has anyone run into this or have an idea how to fix it? A lot of my programs create dot files and they have to be transferred.
 

Davvo

MVP
Joined
Jul 12, 2022
Messages
3,222
Are you using Apple-style Character Encoding and Durable Handles as well? That's my share config for my Time Machine and I get no issues.
I suppose you are on CORE 13-U3.1?
 

anodos

Sambassador
iXsystems
Joined
Mar 6, 2014
Messages
9,554
I'm transitioning from AFP shares to SMB shares for my Macs to access TrueNAS. One problem I run into is failure to copy dot-files to the share. I get this:
The operation can’t be completed because an unexpected error occurred (error code -50).
But I can go into Terminal and use cp to copy it to the mounted share (/Volumes/ . . . ). This was not an issue in AFP.

I've tried toggling the SMB share setting "Enable Alternate Data Streams" and reconnecting to the share, but it didn't help. Has anyone run into this or have an idea how to fix it? A lot of my programs create dot files and they have to be transferred.
There is a bug in vfs_noacl in 13.0-U3.1 if you've totally disabled ACL support on your share. What is output of testparm -s
 

Glorious1

Guru
Joined
Nov 23, 2014
Messages
1,211
Are you using Apple-style Character Encoding and Durable Handles as well? That's my share config for my Time Machine and I get no issues.
I suppose you are on CORE 13-U3.1?
Thanks for the replies. Time Machine share is not too relevant, since you're probably not opening the share and manually copying over dot-files. I created my Time Machine share with all the defaults for multi-time machine.

On other SMB shares I am using Apple-style Encoding. I read about Durable Handles and it didn't seem relevant to Macs, though I could be wrong.
There is a bug in vfs_noacl in 13.0-U3.1 if you've totally disabled ACL support on your share. What is output of testparm -s
I am using CORE 13-U3.1. I forgot to mention that I disabled ACL, but looks like you zeroed in on the cause.

The share "Ark.Jim" is an example where I have this problem.
Code:
Tabernacle:~$ sudo testparm -s
Load smb config files from /usr/local/etc/smb4.conf
Loaded services file OK.
Weak crypto is allowed

Server role: ROLE_STANDALONE

# Global parameters
[global]
    aio max threads = 2
    bind interfaces only = Yes
    disable spoolss = Yes
    dns proxy = No
    enable web service discovery = Yes
    kernel change notify = No
    load printers = No
    logging = file
    max log size = 5120
    netbios aliases = Tabernacle_SMB
    netbios name = TABERNACLE_SMB
    nsupdate command = /usr/local/bin/samba-nsupdate -g
    registry shares = Yes
    restrict anonymous = 2
    server min protocol = SMB2
    server multi channel support = No
    server role = standalone server
    server string = TrueNAS Server
    unix extensions = No
    streams_xattr:store_stream_type = no
    streams_xattr:prefix = user.
    fruit:resource = file
    fruit:metadata = netatalk
    fruit:locking = none
    fruit:delete_empty_adfiles = yes
    fruit:wipe_intentionally_left_blank_rfork = yes
    fruit:veto_appledouble = no
    fruit:posix_rename = yes
    fruit:model = MacSamba
    idmap config *: range = 90000001-100000000
    fruit:nfs_aces = No
    rpc_server:mdssvc = disabled
    rpc_daemon:mdssd = disabled
    idmap config * : backend = tdb
    directory name cache size = 0
    dos filemode = Yes
    mangled names = no
    strict sync = No
    vfs objects = fruit streams_xattr


[Time]
    comment = Time machine share (multi-user)
    ea support = No
    kernel share modes = No
    path = /mnt/Ark/Time/%U
    posix locking = No
    read only = No
    smbd max xattr size = 2097152
    vfs objects = tmprotect fruit streams_xattr shadow_copy_zfs ixnas zfs_core aio_fbsd
    zfs_core:zfs_auto_create = true
    fruit:locking = none
    fruit:time machine = yes
    fruit:resource = stream
    fruit:metadata = stream
    nfs4:chown = true


[Ark.Attic]
    ea support = No
    path = /mnt/Ark/Attic
    read only = No
    smbd max xattr size = 2097152
    vfs objects = catia fruit streams_xattr noacl zfs_core aio_fbsd
    fruit:resource = stream
    fruit:metadata = stream
    fruit:encoding = native
    nfs4:chown = true


[Ark.Jim]
    ea support = No
    path = /mnt/Ark/Jim
    read only = No
    vfs objects = catia fruit streams_xattr noacl zfs_core aio_fbsd
    fruit:resource = stream
    fruit:metadata = stream
    fruit:encoding = native
    nfs4:chown = true


[Ark.Shuling]
    ea support = No
    path = /mnt/Ark/Shuling
    read only = No
    smbd max xattr size = 2097152
    vfs objects = catia fruit streams_xattr noacl zfs_core aio_fbsd
    fruit:resource = stream
    fruit:metadata = stream
    fruit:encoding = native
    nfs4:chown = true
Tabernacle:~$
 

Glorious1

Guru
Joined
Nov 23, 2014
Messages
1,211
That will be fixed in U4. @HolyK reported an issue he was having to me which we narrowed down to the module and fixed. So kudos to him. :)
Good to know. Thanks.
 
Top