Jump to content
Sign in to follow this  
wizard84

SMB share with strange filenames

8 posts in this topic Last Reply

Recommended Posts

Hello, I got a strange issue: some months ago I saw that some of my files (.mkv) were showed in my kodi installation (Librelec) with strange filenames (Example: SLUN7X~U.MKV). Initially i thought that i did some error in a script that i used to parse and modify some infos in my folder, so i renamed the files manually. Yesterday I got the same issue, but i tried to rename the file in a terminal session and...surprise...the filename was corret!!! I checked also the filename by the web interface and it was not corrupted. Today i tried to access to the shared folder from an other machine and the filename is the "corrupted one" (always with SMB protocol). The file is showed perfectly if i try to use NFS instead of SMB. I don't know which other infos could be useful, i'm running the latest version of unraid (6.4.1) but the issue happened with the latest stable version of 6.3 and with 6.4.0. 

Also the unraid server of one of my friends was affected by the same issue.

Share this post


Link to post

The file names are not corrupted, they are just being displayed in the shortened 8.3 DOS form because the name contains characters that the SMB implementation cannot handle.

 

Share this post


Link to post

i think that this in not the scenario that you are talking about. usually, the 8.3 DOS form is with ~1 and the first characters didn't reflect the initial part the name. and btw, the name was not including special characters as you said (the name is Spider-Man: Homecoming (2017).mkv)

Share this post


Link to post

I have once had a FAT32 partition where a M$ bug resulted in the destruction of some long file names giving the above outcome. FAT32 uses many standard FAT16 directory entries intended for 8.3 file names to encode a single long file name. And if some program that doesn't understand this overwrites one of the multiple directory entries for the same file then the outcome can be the destruction of the original long name.

 

What happens if you in Windows write:

dir /x

to see the directory with both long and short file names?

Share this post


Link to post

now i'm travelling and i can't test. the strange thing is that the issue happened from a windows machine, a mac one and a linux one (openelec)...so, from my experience, the issue should be server / service (SMB) side...

Share this post


Link to post

I suspect it is probably the use of ‘:’ in the file name.   As windows uses this as a drive separator it is on the list of character not to use on windows systems.

Share this post


Link to post
10 minutes ago, remotevisitor said:

I suspect it is probably the use of ‘:’ in the file name.   As windows uses this as a drive separator it is on the list of character not to use on windows systems.

Didn't spot the ':' - yes that's a very problematic file name character. Lots of programs has auto-translate rules converting to space-dash-space for better file system compatibility.

Share this post


Link to post

thank you so much. let's stay that is strange....only one file was affected recently and after long time (i think one month).

regards. 

Share this post


Link to post

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this