MacOS – Mountain Lion 10.8.3 file sharing broken for particular named folder

afpmacossharing

I'm running Mountain Lion 10.8.3 on a 2012 Mac Mini. The Mini is headless and I'm using an iMac to do screen sharing for admin purposes. I'm trying to set up sharing of a particular folder on an external HDD attached to the Mini via USB3, but for some reason I can't share this folder and the problem seems to be related to its name. I would like to know what I can do (other than just renaming the folder) to fix the problem.

In more detail: I'm trying to share a folder containing FLAC music files. These files are in a folder called Music/FLAC on the volume Titan, an external HDD attached to the Mini (Saturn). Hence I'm trying to share the folder FLAC.

The HDD has been formatted as Mac OS Extended (Journaled). I don't know how to work out whether it is case sensitive or not. In Disk Utility I can run Verify Disk and it says the volume appears to be okay but Verify Disk Permissions is greyed out (because owners are not enabled for external drives?).

I'm logged in using an administrator account. I go to Sharing in System Preferences. The File Sharing service is checked. In Options, Share files and folders using AFP is checked; SMB is not. I click the + button to add a share, navigate to the FLAC folder, and click Add. The dialog closes, but no share is added. Similarly, if I navigate to the folder using Finder, do Get Info then check the Shared folder checkbox, the change is not persisted when I close the Get Info dialog.

If I look in the Console app, I see entries like this:

System Preferences[4648]: SFL(4648): AddNewItemWithProperties_rpc
returned -36 System Preferences[4648]: LSSharedFileListInsertItemFSRef
returned NULL for path:/Volumes/Titan/Music/FLAC

Now here's the really odd part. If I rename the folder to flac (that is, change the case), then the file sharing works fine! Some experimentation with various casing seems to suggest that all lowercase is fine, but any uppercase letter causes the share to fail. The computer is happy to share the MP3 folder located in the Music folder however.

I'm kind of at a loss to explain this behaviour, but then I don't have much experience with Macs.

The only other thing that may have a bearing on this (although I hope not) is that there is also a NAS box on the same Ethernet network that has a public SMB share named flac. I can't see how this would make any difference though.

Update 26 March

@GrahamPerrin: Your steps 1-4 are basically what I had already done, but I tried again to make sure. No change: flac works ok, FLAC doesn't.

As a quick fix, I was going to share the folder as flac, but although it shared, the share appeared as flac-1 on the iMac. Whatever is going on it definitely doesn't like that folder name, regardless of casing. So now I've renamed the folder to FLACs and shared it like that, and it seems happy enough.

Best Answer

I'm not sure what to tell you about the actual problem but I can share some insight that might help you track it down. The iMac connecting to the lower case "flac" share but mounting it as "flac-1" tells me it's all ready connected to a volume named some form of flac. It could just be that it's all ready connected to the SMB NAS you mentioned.

Regardless I've seen an issue where software expects a certain path and instead of throwing an error about not finding the path it just tried to create it which then leaves a sort of null path that you have to manually remove. If you don't remove it then names like "flac-1" start appearing. Re-reading that it may not make sense but regardless the steps I've used to see what's what are firing up Terminal (found in /Applications/Utilities) and typing:

ls -la /Volumes

If you see more listed here than you expect or can find through normal finder navigation then you can remove them (Only do this if you're 100% sure it's a path that contains nothing you ever want to see again!) by typing:

rm -rf /Volumes/NULLPATH

where NULLPATH is what you wan to get rid of.

Along these lines if the mini is all ready showing a "FLAC" or some such in /Volumes then you're not goign to be able to share a folder by the same name. As in if the mini is connected to the SMB NAS then you're going to have to use a different share name.

Also you can turn ownership on, on your external HD by opening the get info window on the drive and checking the box at the bottom of the window to "Enable Ownership on this volume". I'm not sue it will in any way effect your issue but might be something to try.