Andrew Berry
2017-Oct-01 14:18 UTC
[Samba] Error copying files with extended attributes to Windows clients
When copying files to a Windows 10 client, an error is thrown if the file has extended attributes. In this case, the files were all created by an OS X client with netatalk. I'm using Samba from the Ubuntu 16.04 repository, which is currently 4.3.11+dfsg-0ubuntu0.16.04.11. In my smb.conf: # Netatalk configuration vfs objects = catia fruit streams_xattr fruit:encoding = native streams_xattr:store_stream_type = no streams_xattr:prefix = user. ea support = Yes Windows Explorer initially copies the file data, but throws "Element not found" at the end. On the server: [2017/10/01 10:10:09.695888, 0] ../source3/smbd/open.c:1202(open_file) Error doing fstat on open file Ekahau Heatmapper-Setup.exe:com.apple.metadata"kMDItemWhereFroms (No data available) $ getfattr Ekahau\ Heatmapper-Setup.exe # file: Ekahau Heatmapper-Setup.exe user.com.apple.metadata:kMDItemDownloadedDate user.com.apple.metadata:kMDItemWhereFroms user.com.apple.quarantine user.org.netatalk.Metadata If I remove the extended attributes, or turn off 'ea support', I can copy the file as expected. Is this expected? I assumed that either extended attributes would be copied to the client, or they would be removed automatically if they aren't. Or, is this just a Windows 10 bug? Thanks, -- Andrew Berry
Ralph Böhme
2017-Nov-05 09:15 UTC
[Samba] Error copying files with extended attributes to Windows clients
On Sun, Oct 01, 2017 at 10:18:00AM -0400, Andrew Berry via samba wrote:> When copying files to a Windows 10 client, an error is thrown if the > file has extended attributes. In this case, the files were all created > by an OS X client with netatalk. > > I'm using Samba from the Ubuntu 16.04 repository, which is currently > 4.3.11+dfsg-0ubuntu0.16.04.11. > > In my smb.conf: > > # Netatalk configuration > vfs objects = catia fruit streams_xattr > fruit:encoding = native > streams_xattr:store_stream_type = no > streams_xattr:prefix = user.this combination is not use much, so there's a good chance there's a bug somewhere. Can you test with a later release please? There's a chance that it might work there. If not, please file a bugreport so we can track this. -slow -- Ralph Boehme, Samba Team https://samba.org/ Samba Developer, SerNet GmbH https://sernet.de/en/samba/
Andrew Berry
2017-Nov-05 12:03 UTC
[Samba] Error copying files with extended attributes to Windows clients
I just upgraded to 4.7.1 to fix an unrelated bug with deleting directories for OS X clients, and it looks like this bug has been fixed too. I re-enabled ea support, and copies work. It does look like some attrs are lost in the process, but that's probably because they are larger than some NTFS limit? getfattr vlc-2.2.2.dmg # file: vlc-2.2.2.dmg user.com.apple.diskimages.fsck user.com.apple.diskimages.recentcksum user.com.apple.metadata:kMDItemDownloadedDate user.com.apple.metadata:kMDItemWhereFroms user.com.apple.quarantine user.org.netatalk.Metadata # Copied the file off the share and back with Windows 10 Explorer $ getfattr vlc-2.2.2-copied.dmg # file: vlc-2.2.2-copied.dmg user.COM.APPLE.DISKIMAGES.FSCK user.COM.APPLE.DISKIMAGES.RECENTCKSUM user.COM.APPLE.QUARANTINE user.ORG.NETATALK.METADATA -- Andrew Berry On Sun, Nov 5, 2017, at 07:01 AM, Andrew Berry wrote:> I just upgraded to 4.7.1 to fix an unrelated bug with deleting > directories for OS X clients, and it looks like this bug has been fixed > too. I re-enabled ea support, and copies work. It does look like some > attrs are lost in the process, but that's probably because they are > larger than some NTFS limit? > > getfattr vlc-2.2.2.dmg > # file: vlc-2.2.2.dmg > user.com.apple.diskimages.fsck > user.com.apple.diskimages.recentcksum > user.com.apple.metadata:kMDItemDownloadedDate > user.com.apple.metadata:kMDItemWhereFroms > user.com.apple.quarantine > user.org.netatalk.Metadata > > # Copied the file off the share and back with Windows 10 Explorer > > $ getfattr vlc-2.2.2-copied.dmg > # file: vlc-2.2.2-copied.dmg > user.COM.APPLE.DISKIMAGES.FSCK > user.COM.APPLE.DISKIMAGES.RECENTCKSUM > user.COM.APPLE.QUARANTINE > user.ORG.NETATALK.METADATA > > -- > Andrew Berry > > On Sun, Nov 5, 2017, at 04:15 AM, Ralph Böhme wrote: > > On Sun, Oct 01, 2017 at 10:18:00AM -0400, Andrew Berry via samba wrote: > > > When copying files to a Windows 10 client, an error is thrown if the > > > file has extended attributes. In this case, the files were all created > > > by an OS X client with netatalk. > > > > > > I'm using Samba from the Ubuntu 16.04 repository, which is currently > > > 4.3.11+dfsg-0ubuntu0.16.04.11. > > > > > > In my smb.conf: > > > > > > # Netatalk configuration > > > vfs objects = catia fruit streams_xattr > > > fruit:encoding = native > > > streams_xattr:store_stream_type = no > > > streams_xattr:prefix = user. > > > > this combination is not use much, so there's a good chance there's a bug > > somewhere. > > > > Can you test with a later release please? There's a chance that it might > > work > > there. If not, please file a bugreport so we can track this. > > > > -slow > > > > -- > > Ralph Boehme, Samba Team https://samba.org/ > > Samba Developer, SerNet GmbH https://sernet.de/en/samba/
Ralph Böhme
2017-Nov-05 12:26 UTC
[Samba] Error copying files with extended attributes to Windows clients
On Sun, Nov 05, 2017 at 07:03:28AM -0500, Andrew Berry wrote:> I just upgraded to 4.7.1 to fix an unrelated bug with deleting > directories for OS X clients, and it looks like this bug has been fixed > too. I re-enabled ea support, and copies work. It does look like some > attrs are lost in the process, but that's probably because they are > larger than some NTFS limit? > > getfattr vlc-2.2.2.dmg > # file: vlc-2.2.2.dmg > user.com.apple.diskimages.fsck > user.com.apple.diskimages.recentcksum > user.com.apple.metadata:kMDItemDownloadedDate > user.com.apple.metadata:kMDItemWhereFroms > user.com.apple.quarantine > user.org.netatalk.Metadata > > # Copied the file off the share and back with Windows 10 Explorer > > $ getfattr vlc-2.2.2-copied.dmg > # file: vlc-2.2.2-copied.dmg > user.COM.APPLE.DISKIMAGES.FSCK > user.COM.APPLE.DISKIMAGES.RECENTCKSUM > user.COM.APPLE.QUARANTINE > user.ORG.NETATALK.METADATAlooks like it's now silently skipping xattrs with a colon in their name instead of erroring out. Also, why on earth are the parts of the xattr names after the user namespace prefix all uppercased? -slow -- Ralph Boehme, Samba Team https://samba.org/ Samba Developer, SerNet GmbH https://sernet.de/en/samba/