I have smbd version 3.6.6 on Linux and mount the share on a FreeBSD system with mount_smbfs. When I try to copy (cp) a filename containing a question mark, I will get the error:

 No such file or directory

Renaming the files would be obviously possible, but sadly they are saved html pages referencing each other and I would also have to change the source code.

I know that question marks in filenames is a very bad style but aside from the samba-problem they don't cause any issues.

Disabling or enabling the option display charset = utf-8 does not help.

  • Are you sure those filenames contain ? characters? Is it not just ls or your terminal emulator printing a ? in place of non-printable characters or non-characters? Do you still see a question mark if you run ls | cat or ls | sed -n l? – Stéphane Chazelas Apr 26 '17 at 15:21
  • @StéphaneChazelas question marks still show up with these commands. They also show up in the GUI file manager (pcmanfm). – wolf-revo-cats Apr 26 '17 at 15:38
  • Are those question marks actually in the file name on the server, or are they replacements for non-ASCII characters? If the latter, check that the client and the server have consistent filename encoding settings. See unix.stackexchange.com/questions/358561/… for an issue of the same type. – Gilles 'SO- stop being evil' Apr 26 '17 at 22:39

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.