Files created from Mac via AFP: 8 char name displayed via CIFS

Status
Not open for further replies.

jonandermb

Explorer
Joined
Jan 15, 2014
Messages
76
SO, this is happening: I have a network share that I access via AFP and SMB (lately, I'm trying to stop using AFP because... apple)

The thing is that, months ago, when I installed the freenas box, I copied a lot of files form the old setup to this disk via afp from the finder. If you browse this share via AFP, you see all the names perfectly, even when I connect via ssh to pull the files for backup, I see the filenames as they should be... however, when I access via smb, some of those files and folders have a name of 8 characters like "ABCDEF~4" OR "FEDCBA~9". Any idea what could be the cause of this?

Thanks!

Bonus question: For use from 2 or 3 mac machines at the same time of a directory.... cifs/smb or nfs? Which one could be faster/more reliable?
 
Last edited:
D

dlavigne

Guest
How long is the directory structure? IIRC, Windows truncates at 255 characters (directory structure + filename).
 

m0nkey_

MVP
Joined
Oct 27, 2015
Messages
2,739
You shouldn't be mixing file protocols for datasets as you will get some weird issues, such as this. When you create a new share, you do so via AFP, CIFS or NFS.
 

jonandermb

Explorer
Joined
Jan 15, 2014
Messages
76
Samba mangles names like this when file / folder names contain characters that are illegal under windows. It's ugly, but it keeps things from breaking. For compatibility guidelines under windows see here: https://msdn.microsoft.com/en-us/library/aa365247#naming_conventions
Ding, ding, ding, ding!!! we have a winner!!!! At least the couple of dirs i tested had some trailing spaces. Now, I'll have to figure out a script to fix this...
The dataset has hundreds of folders and inside of those folders, more folders and more files inside. Some of those files come from ancient setups where the shares were made only via afp, hence the illegal chars (I also spotted some files and folders with "\" and/or other problems.)

You shouldn't be mixing file protocols for datasets as you will get some weird issues, such as this. When you create a new share, you do so via AFP, CIFS or NFS.

I know, I know..... the problem is that, when I created the dataset, AFP was the protocol chosen at the time, but as AFP is dying, I'm trying to shift to CIFS, that's how when I enabled this other protocol, I found out these issues :(
 
Status
Not open for further replies.
Top