Martin Steiner / 3MF GmbH
2020-May-29 21:22 UTC
[Samba] Extended attributes not working on mac
I worked with Netatalk for years and want to switch to Samba now. Currently i use Ubuntu 20.04. and Debian 9 before, i had no issues with netatalk at all. As soon as i try to add a color tag (e.g. yellow) with Mac OS 10.15.5, the tag appears shortly but hides one second later. The file system is ZFS with no special options configured. I tried the Ubuntu package but also the builds from source (4.12.1, 4.12.2, 4.12.3). Every attempt failed, i also tried every configuration combination which made sense to me. Finally i spent days with figuring out the problem but i have no glue at all. The current config is basically the example from https://wiki.samba.org/index.php/Configure_Samba_to_Work_Better_with_Mac_OS_X: [Global] min protocol = SMB2 vfs objects = catia fruit streams_xattr fruit:metadata = stream fruit:model = MacSamba fruit:posix_rename = yes fruit:veto_appledouble = no fruit:wipe_intentionally_left_blank_rfork = yes fruit:delete_empty_adfiles = yes [Buchhaltung] vfs objects = catia fruit streams_xattr path = /home/buchhaltung read only = No valid users = martin --------------------------------------------------------- Maybe it is related to the xattr binary (also tried different versions) which tells me a unicode issue: Traceback (most recent call last): File "/usr/local/bin/xattr", line 11, in <module> load_entry_point('xattr==0.9.7', 'console_scripts', 'xattr')() File "/usr/local/lib/python3.8/dist-packages/xattr-0.9.7-py3.8-linux-x86_64.egg/xattr/tool.py", line 196, in main attr_value = attr_value.decode('utf-8') UnicodeDecodeError: 'utf-8' codec can't decode byte 0x9a in position 33: invalid start byte Please help - thank you in advance! Martin
Martin Steiner / 3MF GmbH
2020-May-30 18:00 UTC
[Samba] Extended attributes not working on mac
I changed the configuration and raised the log level, in my opion samba tries to access the non existent double files. Samba is now probably writing the data in a netatalk compliant way in the extended attributes of the file but is not reading it. new configuration: [Global] min protocol = SMB2 vfs objects = catia fruit streams_xattr fruit:metadata = stream fruit:resource = stream fruit:encoding = native fruit:model = MacSamba fruit:posix_rename = yes fruit:veto_appledouble = no fruit:wipe_intentionally_left_blank_rfork = yes fruit:delete_empty_adfiles = yes streams_xattr:prefix = streams_xattr:store_stream_type = no dos charset = CP932 log level = 3 vfs:5 [Buchhaltung] vfs objects = catia fruit streams_xattr path = /home/buchhaltung read only = No valid users = martin fruit:resource = stream fruit:metadata = stream fruit:encoding = native streams_xattr:prefix = streams_xattr:store_stream_type = no ------------------------------------------ Xattr binary is not working, so i used attr: attr -g "com.apple.metadata:_kMDItemUserTags" test.numbers Attribute "com.apple.metadata:_kMDItemUserTags" had a 54 byte value for test.numbers: bplist00?XOrange 7 ------------------------------------------ xattr on my mac tells nothing, but when i try i get the following error in the samba log on the ubuntu server: [2020/05/30 19:54:27.887673, 3] ../../source3/smbd/smb2_server.c:3264(smbd_smb2_request_error_ex) smbd_smb2_request_error_ex: smbd_smb2_request_error_ex: idx[5] status[NT_STATUS_NO_SUCH_FILE] || at ../../source3/smbd/smb2_query_directory.c:159
I?m not sure if this is related, but there was a regression a while back in handling resource forks in folder icons. It was supposed to be fixed in 4.10.13 but I don?t think it quite works yet and I haven?t had the time to test it further yet. -Perttu> On 30 May 2020, at 21.00, Martin Steiner / 3MF GmbH via samba <samba at lists.samba.org> wrote: > > I changed the configuration and raised the log level, in my opion samba tries to access the non existent double files. > Samba is now probably writing the data in a netatalk compliant way in the extended attributes of the file but is not reading it. > > new configuration: > > [Global] > min protocol = SMB2 > vfs objects = catia fruit streams_xattr > fruit:metadata = stream > fruit:resource = stream > fruit:encoding = native > fruit:model = MacSamba > fruit:posix_rename = yes > fruit:veto_appledouble = no > fruit:wipe_intentionally_left_blank_rfork = yes > fruit:delete_empty_adfiles = yes > streams_xattr:prefix = > streams_xattr:store_stream_type = no > dos charset = CP932 > log level = 3 vfs:5 > > [Buchhaltung] > vfs objects = catia fruit streams_xattr > path = /home/buchhaltung > read only = No > valid users = martin > fruit:resource = stream > fruit:metadata = stream > fruit:encoding = native > streams_xattr:prefix = > streams_xattr:store_stream_type = no > > ------------------------------------------ > > Xattr binary is not working, so i used attr: > > attr -g "com.apple.metadata:_kMDItemUserTags" test.numbers > Attribute "com.apple.metadata:_kMDItemUserTags" had a 54 byte value for test.numbers: > bplist00?XOrange > 7 > > ------------------------------------------ > > xattr on my mac tells nothing, but when i try i get the following error in the samba log on the ubuntu server: > > [2020/05/30 19:54:27.887673, 3] ../../source3/smbd/smb2_server.c:3264(smbd_smb2_request_error_ex) > smbd_smb2_request_error_ex: smbd_smb2_request_error_ex: idx[5] status[NT_STATUS_NO_SUCH_FILE] || at ../../source3/smbd/smb2_query_directory.c:159 > > -- > To unsubscribe from this list go to the following URL and read the > instructions: https://lists.samba.org/mailman/options/samba
Am 5/30/20 um 8:00 PM schrieb Martin Steiner / 3MF GmbH via samba:> I changed the configuration and raised the log level, in my opion samba tries to access the non existent double files. > Samba is now probably writing the data in a netatalk compliant way in the extended attributes of the file but is not reading it. > > new configuration: > > [Global] > min protocol = SMB2 > vfs objects = catia fruit streams_xattr > fruit:metadata = stream > fruit:resource = streamthis last line is long, remove it. Cf man vfs_fruit. -slow -- Ralph Boehme, Samba Team https://samba.org/ Samba Developer, SerNet GmbH https://sernet.de/en/samba/ GPG-Fingerprint FAE2C6088A24252051C559E4AA1E9B7126399E46 -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 833 bytes Desc: OpenPGP digital signature URL: <http://lists.samba.org/pipermail/samba/attachments/20200601/42369067/signature.sig>