APLawrence.com -  Resources for Unix and Linux Systems, Bloggers and the self-employed

How do I fix files showing up as 0k on a SMB mount in Snow Leopard?

by Bruce Garlock

We have been battling a strange Snow Leopard font issue (who hasn't) for a while now, and this one seemed to work on some SL machines, and not others. As it turned out, I had made some changes as to the way SMB connections happen on my machine, so I couldn't reproduce this issue. I had even made this change on a couple of our Art department managers machines, so we couldn't get it to mess up on their machines either. The problem presents itself like this:

* An SMB connection to a Windows Server 2003
* Files where originally copied via AppleTalk (AFP)
* When viewing those files, they show up as 0k

In our case, those files are fonts, and this SMB share was our font sharing resource for our company. So, some users would go to the SMB share and see the fonts as 0k, unable to copy them or use them in any way. We had to have someone who had a machine where things worked properly (10.5 and below, and as it turns out the little hack I will present below for the SL machines). This of course is a pain, and slows down our workflow.

Long story short, we had to disable "named streams" in SMB. To do this system wide (as root*):


1. Create a new file (as this file is probably not on your system) as: /etc/nsmb.conf

2. Add the following lines:

[default]
streams=no

3. Save, and reboot

* You need to be root to write this file to /etc. In order to become root, an account needs to be an 'admin' account. Then, just hit the terminal with:

'sudo su -'
 

If you are using an account that is a regular user, then you will need to 'su' to the admin account, before you can run 'sudo su -'

Type in your admin users password, and you should be at the # prompt, denoting root.

Hope this helps someone else out. I had totally forgotton that I had made those changes to /etc/nsmb.conf on the machines where everything was working!



Got something to add? Send me email.





(OLDER)    <- More Stuff -> (NEWER)    (NEWEST)   

Printer Friendly Version

-> -> files showing up as 0k on a SMB mount in Snow Leopard

5 comments



Increase ad revenue 50-250% with Ezoic


More Articles by © Bruce Garlock







Tue Sep 21 17:57:19 2010: 8986   BruceGarlock

gravatar


It looks like this change happens during the mount, and no re-boot is needed. I just changed a Mac, and remounted and everything worked!







Fri Jan 14 12:58:29 2011: 9232   RobM

gravatar


I have the exact same problem but the instructions here seem to be addressed to people with a better knowledge of working in Terminal on the Mac. Could you (or someone) show the exact step-by-step so I can take care of this problem? I called Apple and they say it's a problem with the server.



Fri Jan 14 13:03:18 2011: 9233   TonyLawrence

gravatar


That is the step by step.

You probably just need to learn how to edit a file. There are plenty of basic vi tutorials here and elsewhere.

or, after you have done the "su -", just do

cat > /etc/nsmb.conf

press enter

type the two lines, enter after each, then hold ctrl and press "d"







Fri Jan 14 13:47:23 2011: 9234   RobM

gravatar


That was all I needed (I didn't know the "cat" command - nor could I find it).
Thanks - it worked.
It also fixed the problem of the label color not showing up on the Snow Leopard computer.
Why couldn't Apple take care of that?

I will check-out the "basic vi tutorials"

Thanks again!



Tue Oct 8 12:54:33 2013: 12342   BruceGarlock

gravatar


We have also noticed this is a fix for OS X 10.8 Mountain Lion. It seems that even though Apple doesn't use SAMBA in 10.8, the same fix still applies.

------------------------
Kerio Samepage


Have you tried Searching this site?

Unix/Linux/Mac OS X support by phone, email or on-site: Support Rates

This is a Unix/Linux resource website. It contains technical articles about Unix, Linux and general computing related subjects, opinion, news, help files, how-to's, tutorials and more.

Contact us





Any inaccuracies in this index may be explained by the fact that it has been sorted with the help of a computer. (Donald Knuth)





This post tagged: