Samba server syncing files – Problem copying files from Windows to Linux, especially in Mepis

Problem: When file names with international character sets copy from Windows to Linux in Mepis the characters are not translated properly.

Detail: When your files copy from Windows to Linux and the international characters (like African and Brazilian song names) don’t copy correctly, all other filenames are fine, you need to edit your /etc/samba/smb.conf file which is the config file for samba.

Solution: Put this in to the head of the file to fix odd international characters from windows to linux copy:

unix charset = ISO 8859-1

Remember to stop and restart your Samba server: (Linux Mepis and Ubuntu) sudo /etc/init.d/samba restart

Problem: When your use a program to synchronize files from Windows to Linux (Mepis) and some files continually recopy even though they are the same (identical dates) on both machines.

Detail: You need to pay attention to the 2 second file date difference on an NTFS file system (tell your sync program to ignore it), as well as make sure that the Linux server uses the right file type designation for the incoming files from Windows.

Solution: While you are in your /etc/samba/smb.conf file go to the bottom share descriptions and add single line under each.

Put this in the individual share section to fix timestamps that cause file syncs to copy every time from windows to linux.

fstype = samba
Remember to stop and restart your Samba server: (Linux Mepis and Ubuntu) sudo /etc/init.d/samba restart


Sample: smb.conf file (sample code):

———–My Samba smb.conf from Mepis 3.4 to 7 works!————-
;*******************section global*****************
[global]
ldap ssl = No
restrict anonymous = no
socket options = TCP_NODELAY IPTOS_LOWDELAY SO_SNDBUF=4096 SO_RCVBUF=4096
guest ok = yes
map to guest = Bad User
domain master = no
hosts allow = 192.168.0. 192.168.1. 192.168.2. 127.
passdb backend = tdbsam guest
dns proxy = no
printing = cups
server string =
max protocol = NT
kernel oplocks = no
; Fix your workgroup name!
workgroup = WORKGROUP
server signing = Auto
security = server
paranoid server security = no
unix charset = ISO 8859-1
panic action = /usr/share/samba/panic-action %d
preferred master = no
max connections = 8
max log size = 1000
; Fix your servername!
netbios name = MYSERVERNAME
;*******************section homes*****************
[homes]
comment = Home Directories
browseable = no
read only = no

[DriveONE]
case sensitive = no
msdfs proxy = no
path = /mnt/hdb1/MyFiles/
hide files = *.log/*.tmp/*.evt/*.bak/

[Drive_TWO]
path = /mnt/hde1/MoreFiles/
read only = no
case sensitive = no
msdfs proxy = no
fstype = Samba

[Drive_THREE]
path = /mnt/hde2/EvenMoreFiles/Subdirectory/
case sensitive = no
msdfs proxy = no

[Drive_FOUR]
path = /mnt/hdg1/MediaFilesWritable/
read only = no
case sensitive = no
msdfs proxy = no

[regularshare]
path = /home/myuser/ReadOnlyShared/
read only = yes
case sensitive = no
msdfs proxy = no
only user = yes
fstype = Samba

[Drive_Five]
case sensitive = no
msdfs proxy = no
read only = no
path = /mnt/hdc1/FilesWritable/
fstype = Samba
———–END My Samba smb.conf from Mepis 3.4 works!————-
After editing your smb.conf remember to stop and restart your Samba server: (Linux Mepis and Ubuntu) sudo /etc/init.d/samba restart

Leave a comment