"odd" character filenames don't copy when drive is mounted

Hi,

I have a WDMyCloud and a WDMyBookLive. On the WDMybookLive, if I mount the WDMyCloud using the following command:

mount //wdmycloud/Public -o username=xxxx,password=yyyyy /media/wdmycloud/

all seems to work fine, apart from when I try to copy files from the WDMyCloud that have “unusual” characters in their filename - I’ve read about mounting using utf-8 and utf-16 but this doesn’t seem to solve the problem.

Anyone else got any ideas?

How are odd characters there to begin with?

Hi TonyPh12345,

They are part of filenames for files created by applications.  For example, I have an itunes app whih has a “heart symbol” in the filename:

Elmo :heart: ABCs 2.50.ipa

And some movie related scrapped info with accented charctaers, for example:

Bojana_Novaković.jpg

Files are fine on the WDMyCloud but, if I mount that drive from within a shell on the MyBookLive I can’t access the files (I’m trying to backup the MyCloud to the MyBook)

Please provide the EXACT mount command you’re trying (the one described above is invalid as no mount type is specificed)

and the errors you get that relate to those files.

Hi,

erm… that is the exact mount command I’m using (obviously with the username and password filled correctly!).

I have tried the same with -t cifs option, but still no better result.

So, as an example if I try to copy all files in a directory (where one of the files contains an unusual character) using the following command:

cp /media/wdmycloud/Videos/Movies/Edge\ of\ Darkness/.actors/* .

The error message I get is:

cp: cannot stat `/media/wdmycloud/Videos/Movies/Edge of Darkness/.actors/Bojana_Novakovi?.jpg’: No such file or directory

Using Rsnapshot to copy these files results in:

file has vanished: “/media/wdmycloud/Videos/Movies/Edge of Darkness/.actors/Bojana_Novakovi?.jpg”

Thanks again for your help!

If you try to copy specifically that file, and use tab-completion to complete the file name, what happens?

Ie,

cp /media/wdmycloud/Videos/Movies/Edge\ of\ Darkness/.actors/Boj[TAB] .

What happens?

Well, I was able to reproduce this.

I am able to mount the same share easily using my Ubuntu desktop, and the files work as expected.

However, the My Book Live appears to ignore the iocharset / codepage options, making them unable to interpret those files.

I think I’ve found a solution for you.

Since the Shell isn’t really intended to be used by mere humans, the locale for the shell isn’t configured the same way.

If you log in and execute:

export LC_ALL=en_US.UTF-8
export LANG=en_US.UTF-8
export LANGUAGE=en_US.UTF-8

then re-mount the share with -o iocharset=utf8, it will work.   (At least, it did for me.)

Thanks, that seems to work!

Looks like the change is permanent on an SSH logout/login - I’ll see if my rsnapshot run tonight works as well!