[Samba] Rsync with smbfs filesystem and characters like é - updated from version on RSync List

Nic Colledge colledge at dsl.pipex.com
Thu Jan 15 18:43:26 GMT 2004


Hello,
 
I’m using samba version 3.0.1-Debian
rsync version 2.6.0 protocol version 27
And mount version 2.12
With kernel 2.4.22
 
As far as in aware these are the latest versions in Debian unstable.
 
The problem im having is when mirroring my mp3 collection file names
with characters like é Ï Ê etc. are not displayed in the linux
filesystem and then when browsing to the directory through samba using a
windows machine they are displayed as “” “ for example “02 R”yksopp -
Eple.mp3”.
 
Originally they would be displayed as “02 R””””””””””””””””” on the
windows machine until I added “dos charset = CP850” and “unix charset =
ISO8859-16” to the smb.conf file.
 
This problem only occours when using the linux machine to copy from the
windows machine to the linux machine. If the windows machine “uploads”
to the linux machine everything works fine and filenames appear correct
on both the windows and linux machines. Unix charset ISO8859-1 didn’t
work as well for me, as in the filenames were not written correctly on
the linux machine when doing an upload but appeared fine when using the
windows machine to browse the directory through samba.
 
Any help in resolving this problem would be much appreciated.
 
The script I use for the mirroring operation is as follows:
 
################################## START SCRIPT
#!/bin/bash
# This is a simple script to mirror the MP3 Directory from the RAID to
this machine
 
#COMMANDS USED
MOUNT=/bin/mount;
RSYNC=/usr/bin/rsync;
UMOUNT=/bin/umount;
ECHO=/bin/echo;
ID=/usr/bin/id;
DATE=/bin/date;
 
# ACTUAL SCRIPT
$ECHO " ";
$ECHO "MP3 Mirroring Script Start";
$DATE;
# make sure we're running as root
if (( `$ID -u` != 0 )); then { $ECHO "Sorry, must be root.  Exiting...";
exit; } fi
 
$MOUNT -t smbfs -o
username=XXX,password=XXX,codepage=CP850,iocharset=ISO8859-1
//beast-mk2/RAID /beast-RAID ;
if (( $? )); then 
{
    $ECHO "Could not mount RAID on beast-mk2 - Exiting";
    $DATE;
    exit;
}
fi;
 
$RSYNC -a -v --delete-after --modify-window=2 /beast-RAID/Mp3/
/Mp3-Mirror/ ;
 
$UMOUNT /beast-RAID ;
if (( $? )); then 
{
    $ECHO "WARNING: Could not UNMOUNT beast-RAID";
    $DATE;
}
fi;
$ECHO "MP3 Mirroring Script Finished";
$DATE;
 
################################## END SCRIPT
 
Thanks in advance.
 
Regards
Nic Colledge
colledge at dsl.pipex.com
n.j.colledge at bradford.ac.uk
 


More information about the samba mailing list