Article 5E620 Another incarnation of the Windows-acceptable-filename-characters-problem, without windows.

Another incarnation of the Windows-acceptable-filename-characters-problem, without windows.

by
chrislewis79
from LinuxQuestions.org on (#5E620)
Hi,

Have googled this and searched the forum, lots of versions of this problem, I am struggling to generalize the solutions to my situation, what am I missing?

I run a headless Rpi sharing 4 folders, 2 private/user and 2 public/shared (Pics/Music). I filled the Music folder from both a Win7 machine and a Linux Lite machine (this was a while back). I ripped my music CD's copied them to therpi samba share Directory. No issues can play from Linux and windows. I used MusicBrainz to get some metadata, but it missed some and there is no cover art (this is not today's problem).

Today (several years later) I am building anew home server and copying the files over. The rpi is on kernel 4.1.20 (2016) and smbclient -V gives version 3.6.6. The RPi has been sucessfully mounted from my Mint laptop, and mounted from the prospective ubuntu box, and mounted from my wife's win7 laptop. Oh and mounted from my daughter's win10 machine though it does ask for passwords for the shared folders too. (also not today's problem).

The Music folder is correctly mounted on the server at /mnt/oldserver/Music. I can browse it and play it. I want to copy the music files over to the new folder on the new server which is /mnt/newshare/Music. When I do a Code: cp -rp /mnt/oldserver/Music /mnt/newshare/Music I get errors for everything with a space, a colon, a question mark and a few other things in the FILENAME. Given music track creative naming, that is a large proportion of the files.

I appreciate samba will always presume it is talking to windows, and play windows friendly, but.. ..this is linux to linux. The files are not mangled on the RPi shares. (a few are). It is linux to linux. It does not have to mangle anything to send the files over. The error says Code:'cannot stat filename : FILENAME WITH:?:?:'Then says Code:cannot open filename : SAMEFILENAMEWITH:?:?:?: Nosuch file or directory'. So that is 2 errors per filename and it is almost as if it is the RPI (raspbian) which is struggling. (but not sure)

What have I tried:
I Know about name mangling so I set the name mangling to no. No better.
I know about utf8 so I set the server and the client(newserver) fstab mount to utf8. no better
I read about changeing the doscharset to CY850. no better.
I also bought and read (the very old) "Orielly Using Samba" (2007), and read about telling samba the client architecture with the %a flag on the end of the Code: path = /share/this/please%CIFSFS, using CIFSFS for linux smb client. No better, still error on filenames acceptable to linux but not Windows, even though there is now windows in the picture.

for completeness:
the unbuntu server is :
me@host :~$ uname - a
Linux PMS1 5.8.0-43-generic #49~20.04.1-Ubuntu SMP Fri Feb 5 09:57:56 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux
me@host :~$ smbclient -V
Version 4.11.6 Ubuntu

This is not a new problem and has several solutions, I just can't see how I make this work. Thanks for your help. The attachement is the rpi smb.conf
Attached Files
txt.gifrpismbconf.txt (12.8 KB)
latest?d=yIl2AUoC8zA latest?i=UfkMPPqqhQk:4tmxjELJha0:F7zBnMy latest?i=UfkMPPqqhQk:4tmxjELJha0:V_sGLiP latest?d=qj6IDK7rITs latest?i=UfkMPPqqhQk:4tmxjELJha0:gIN9vFwUfkMPPqqhQk
External Content
Source RSS or Atom Feed
Feed Location https://feeds.feedburner.com/linuxquestions/latest
Feed Title LinuxQuestions.org
Feed Link https://www.linuxquestions.org/questions/
Reply 0 comments