Bugs & Fixes: Solving a strange file sharing error
Recently, I tried to connect my Mac Pro to my MacBook Air via OS X Lion’s file sharing capabilities. On most days, this would be no problem. This was not one of those days.
I clicked the Mac Pro listing in the Shared section of a Finder window sidebar on my MacBook Air; I next clicked the Connect As… button and logged in with my name and password. Instead of initiating a successful connection, the following message appeared:
This message was odd at several levels. First off, there were no other users connected to the Mac Pro. I was quite certain of this. Second, I could still connect to the Mac Pro via screen sharing; it was just file sharing that failed. Third, I had never had this problem before. I believe it first cropped up after updating my Pro to Lion (OS X 10.7). Finally, I could connect to my MacBook Air from the Mac Pro; it was just going in the reverse direction that did not work. To be clear, the client version of OS X Lion was installed on both Macs, not the server version.
None of the quick and dirty remedies I tried, such as restarting the Mac, had any effect. So I turned to a Web search. I discovered that numerous other users had reported similar symptoms. However, only one search result, an Apple Support Communities thread, provided a fix that worked for me. Actually, it provided two fixes that worked.
The first recommendation was to go to the File Sharing section of the Sharing System Preferences pane (on the Mac Pro). From here, click the Options… button and reverse the selected options: uncheck the AFP option and select the SMB (Windows) choice instead. I was skeptical that this would work, as no Windows sharing was involved in my setup. But I gave it a try and (surprise!) I could now successfully connect to the Mac Pro.
The second suggested solution gets at what is more likely the core cause of the problem. Go to /Library/Preferences and open the com.apple.AppleFileServer.plist file. I opened the file using Apple’s Property List Editor, but .plist files open in any number of programs (you can even access the file contents via the defaults command in Terminal).
Once you have the file open, locate the maxConnections and maxGuests properties. If the maximum numbers are zero (0), that’s the problem. You should change the numbers to ten (10). Note: You may have to modify the permissions of the file (or temporarily move the file out of the Library folder) before OS X will allow you to save the change. I suspect that deleting the .plist file altogether, forcing OS X to create a new default file, would also work (although I did not test this out).
For the file on my Mac Pro, the max numbers were indeed zero. After making the edit, I was able to successfully connect to the Pro; the error message was gone.
The two suggested solutions are either-or. That is, if you do the .plist file edit, you don’t have to switch to the Windows option. The .plist file edit is the solution I prefer.
Why and how did the .plist file wind up with these erroneous zero values in the first place? I have no idea. I assume it was one of those glitches that occasionally happen when upgrading OS X from one version (e.g., Snow Leopard) to another (e.g., Lion). Whatever. The good news is that, if this happens to you, it’s an easy problem to fix.