Q What are ’named streams’, and how are they important in Samba (SMB) sharing?
A OS X and the Mac Extended (HFS+) file system support more than just plain data in files. Traditional resource forks and more recent metadata, together known as extended attributes, are important Mac enhancements that are not found in many other operating systems or file systems. The problems arise in packaging such non-linear file structure on a system which can only deal with flat files.
AppleDouble is an old way of encoding Mac files so that all their data and extended attributes are preserved, even on very crude file systems, by bundling them all into a single data file. Samba (SMB) sharing used to have to use tricks like storing Mac files in AppleDouble format to overcome the limitations of SMB servers, but more recent versions have direct support for extended attributes in these named streams – also referred to in Windows terminology as alternate data streams (ADS).
There are various ways of enabling them, for instance on NAS servers that use SMB, that could include placing the hidden file .com.apple.smb.streams.on at the top level of your SMB share. You can also set
streams=yes in an nsmb.conf configuration file.
Unfortunately individual SMB implementations may not always support named streams properly. If you try to use them on a system with limited or flawed support, you are likely to see error alerts citing -36 or -50 codes when trying to save files to the shared volume. Although these can originate from other problems, the best approach to dealing with them is to turn named streams off. You may also need to contact the NAS vendor to see if they can offer a solution or update. On Linux and other servers, you should check the version of SMB that is running and consider upgrading to the current release.
Updated from the original, which was first published in MacUser volume 26 issue 9, 2010.