[Samba] Help request from non-expert: mounting a samba drive with the right charset for accented filenames

Ben Kenward ben.kenward at gmail.com
Mon Sep 8 10:41:48 GMT 2008


Hi all,

I hope someone might be able to offer me some advice. I have a NAS
box, a QNAP TS-109 which runs a version of Debian Linux. It has a
local ext3 drive, and I also smbmount a network drive on it (a Lacie
ED mini which I have tried formatted as both ext3 and FAT32 without
solving my problems).

My problem is that I am unable to correctly rsync files with accented
characters in the names between the two boxes, because I am unable to
mount them both in a way in which the same such file appears to be
named the same on both the local and the networked drive. For example,
currently, no matter how I try to mount a file with an "ä" in the the
name (that's an "a" with a two dot accent), it appears as two
characters "A☼" when I "ls" the local ext3 drive, and as a "," when I
"ls" the network drive.

I have several difficulties in solving this problem. As I currently
understand it, if I could use the same "-o iocharset=whatever"
argument for mounting both drives, then it ought to work (though I'm
not 100% on that assertion). However, I don't know what charset I can
use which would work. Using, for example, "-o iocharset=iso8859-1" to
smbmount the network drive, the filenames appear exactly the same as
with no iocharset argument. However, using "-o
iocharset=definitelydoesntexist" also mounts the drive in the same
way, and doesn't even produce an error (to stderr or dmesg). So how do
I know what iocharset arguments are available, let alone which one is
correct?

The answer to that last question might be to find out how the local
drive is mounted. The problem is, even though the output of a "mount"
command includes the following line about the local disk in question:

/dev/sda3 on /share/HDA_DATA type ext3
(rw,usrjquota=aquota.user,jqfmt=vfsv0,data=writeback,extents)

as far as I can tell nothing there is related to the charset, and the
fstab /etc/fstab file contains nothing at all related to that drive:

# /etc/fstab: static file system information.
#
# <file system> <mount pt>     <type>   <options>         <dump> <pass>
/dev/ram       /              ext2      defaults         1      1
proc            /proc          proc     defaults          0      0
none            /dev/pts        devpts  gid=5,mode=620  0       0

So the drive is mounted in some other way than from /etc/fstab. But I
don't know how to find out how. And as far as I understand, there is
anyway no "-o iocharset=" option for the standard mount command for
ext3? There is therefore only one way it can have been done, right? If
so, how do I duplicate that with my smbmount command?

Other information which may be relevant:

The files with accents were created by windows.

I have read that "mount -t smbfs" should be synonymous with
"smbmount". Well it isn't for me - I can't mount the network drive at
all with the former command.

Any help at all very much appreciated!

Cheers,

Ben

-- 
Dr. Ben Kenward
Department of Psychology, Uppsala University, Sweden
+46 18 4712125
http://www.benkenward.com


More information about the samba mailing list