Languages

Mac OS X v10.5, v10.6: About named streams on SMB-mounted NAS, Mac OS X, and Windows servers; "-36" or "-50" alerts may appear

Learn about using named streams over SMB connections in this advanced article.

Named streams are used to store Mac OS X extended attributes and can be leveraged to avoid using AppleDouble files to store the data fork and the resource fork of legacy Mac files.

Mac OS X Server v10.5 and v10.6, as well as many Network Attached Storage (NAS) devices, support named streams when you connect to them via SMB.

Microsoft Windows servers with NTFS-formatted hard drives also support named streams when you connect to them via SMB; named streams are called "Alternate Data Streams" in Windows.

Mac OS X v10.5 and v10.6 clients automatically enable named streams support when they have a SMB connection to a Mac OS X Server v10.5 or v10.6-based server.

Mac OS X v10.6 clients automatically enable named streams over SMB when the NAS or Windows server claims to support it.  See below for details about how to activate Mac OS X v10.5 client support of named streams over SMB connections to a NAS or Windows server.

You can enable named streams in three different ways, as described below.

Enabling named streams

Choose the option that is best for you.

To enable named streams for Mac clients on a per SMB mount point basis

  1. Mount the NAS device or Windows server on your Mac via SMB. Note: A NAS is used in the below command examples.
  2. Run the Terminal command ls /Volumes and note the proper mount name for your shared NAS.
  3. Run this command in Terminal (replace Shared NAS with the proper mount name of your shared NAS):
    touch "/Volumes/Shared NAS/.com.apple.smb.streams.on"
    
  4. Eject the NAS or Windows server by dragging it to the Trash.
  5. Mount the NAS or Windows server  again. Named streams will be active.
  6. If you have legacy AppleDouble files, execute this command in Terminal to convert them before using them.
    dot_clean --keep=dotbar "/Volumes/Shared NAS"
    Important: Once converted, all Mac clients accessing this data will have to have named streams enabled. 

To enable named streams as a default for your Mac OS X client user account

Execute these two commands in Terminal:

echo "[default]" >>  ~/Library/Preferences/nsmb.conf
echo "streams=yes" >> ~/Library/Preferences/nsmb.conf

To enable named streams as a default for all Mac OS X client user accounts on a Mac

Log in to Mac OS X with an admin user account if you aren't already logged in as an admin, then execute these two commands in Terminal:

echo "[default]" | sudo tee -a /etc/nsmb.conf
echo "streams=yes" | sudo tee -a /etc/nsmb.conf

Disabling named streams

To disable named streams for Mac clients on a per SMB mount point basis

  1. Mount the NAS device or Windows server on your Mac via SMB. Note: A NAS is used in the below example command.
  2. Run the Terminal command ls /Volumes and note the proper mount name for your shared NAS.
  3. Run this command in Terminal (replace SharedNAS with the proper mount name of your shared NAS):
    touch "/Volumes/SharedNAS/.com.apple.smb.streams.off"
  4. Eject the NAS or Windows server by dragging it to the Trash.

Named streams will now be deactivated whenever the NAS or Windows server is mounted.

To disable named streams as a default for your Mac OS X client user account

Execute these two commands in Terminal:

echo "[default]" >>  ~/Library/Preferences/nsmb.conf
echo "streams=no" >> ~/Library/Preferences/nsmb.conf

To disable named streams as a default for all Mac OS X client user accounts on a Mac

Log in to Mac OS X with an admin user account if you aren't already logged in as an admin, then execute these two commands in Terminal:

echo "[default]" | sudo tee -a /etc/nsmb.conf
echo "streams=no" | sudo tee -a /etc/nsmb.conf

Learn more

Note: If the generic "-36" or "-50" alerts appear when opening or saving files to your SMB-mounted NAS, disable named streams as described above, then contact the vendor of your NAS for support if the issue no longer occurs. -36 and -50 alerts are not restricted to this issue; if the issue persists after disabling named streams, undo what you have done above. There is a different issue that needs to be investigated.

Important: Information about products not manufactured by Apple is provided for information purposes only and does not constitute Apple’s recommendation or endorsement. Please contact the vendor for additional information.
Last Modified: Jul 14, 2014
Helpful?
Yes
No
  • Last Modified: Jul 14, 2014
  • Article: HT4017
  • Views:

    3245
  • Rating:
    • 100.0

    (1 Responses)

Additional Product Support Information

Start a Discussion
in Apple Support Communities
See all questions on this article See all questions I have asked