Bug 2931 - Accents on a vfat filesystem and samba
Accents on a vfat filesystem and samba
Status: CLOSED WONTFIX
Product: Samba 3.0
Classification: Unclassified
Component: Extended Characters
3.0.10
x86 Linux
: P3 major
: none
Assigned To: Alexander Bokovoy
Samba QA Contact
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2005-07-29 16:54 UTC by Daniel
Modified: 2005-09-05 14:05 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Daniel 2005-07-29 16:54:44 UTC
I am trying to setup a linux box on which I would like to have samba sharing a 
vfat filesystem to users on my LAN using windows XP.
The problem I face is that I can successfully create a file without accents 
from the windows XP client, however when I try to create a file with a accent -
 like 'é' or anything else - the file cannot be created. The following message 
is displayed in a popup window on the client machine:
"Groupe de secteurs non valide." in French which means "Sectors group not 
valid".
I have setup the smb.conf file like the followings:

[global]

# workgroup = NT-Domain-Name or Workgroup-Name
   workgroup = WORKGROUP
# server string is the equivalent of the NT Description field
   server string =
# This adds some security to avoid people connecting from outside the LAN:
   hosts allow = 192.168.0. 127.
# all log information in one file
   log file = /var/log/samba/smbd.log
#   log level = 8
# Security mode. Most people will want user level security. See
# security_level.txt for details. share or user.
   security = user
# Most people will find that this option gives better performance.
# See speed.txt and the manual pages for details
   socket options = TCP_NODELAY SO_RCVBUF=8192 SO_SNDBUF=8192
# Set the interfaces that are allowed to use SMB for additionnal security:
   interfaces = 192.168.0.0/255.255.255.0

# DNS Proxy - tells Samba whether or not to try to resolve NetBIOS names
# via DNS nslookups. The built-in default for versions 1.9.17 is yes,
# this has been changed in version 1.9.18 to no.
   dns proxy = no

   winbind use default domain = no
   map to guest = Bad User
#   encrypt passwords = yes
   client code page = 850
   character set = ISO8859-1
# A publicly accessible directory

 [public]
   comment = Public files
   path = /samba_public
   public = yes
   read only = no
   browseable = yes
   guest ok = yes

[backups]
   comment = Backup dirs
   path = /samba_backups
   valid users = john
   force user = john
   create mask = 0700
   directory mask = 0700
   public = no
   writable = yes
   read only = no
   printable = no
   # This allows you to hide the shared path.
   browseable = no
   guest ok = yes

As soon as I access the public share (which is on another filesystem - ext3), 
there is no problem at all.
I am using samba version 3.0.10-1.4 for RHEL 4.

My vfat mount options are:
mount -t vfat -o uid=john,gid=samba,umask=000,iocharset=8859-
1 /dev/hdb1 /samba_backups

This is reproductible. Maybe this bug is there since the beginning, I don't 
know.
Thanks,
Daniel
Comment 1 Daniel 2005-07-29 16:57:54 UTC
Sorry for the two config lines which seems obsolete:
   client code page = 850
   character set = ISO8859-1
I replaced them with:
   unix charset = iso8859-1
   dos charset = CP850
   display charset = LOCALE

But this doesn't change anything to the problem.
Daniel
Comment 2 Gerald (Jerry) Carter 2005-08-30 05:45:10 UTC
There are known issues when exporting vfat partitions 
via Samba.  This seems to be another one of them.
If you could reproduce this error on an ext2/3 partition,
we would be more convinced that it is a Samba bug.
Currently, though it appears to just be a limitation
in the vfat kernel code.
Comment 3 Daniel 2005-09-05 14:05:52 UTC
Good news. I have finally found the problem with the help of the CentOS 
community. This is not a Samba or kernel bug. If you use CentOS 4 and newer 
Linux distributions, then you will need to use the following charset settings 
for european languages users:

First put those lines in the smb.conf file:

   unix charset = UTF-8
   dos charset = UTF-8
   display charset = LOCALE


And then, mount the FAT 12, 16, 32 or whatever like this:
/dev/hdb1	/samba_backups	vfat	uid=nobody,gid=samba,umask=000,utf8
	0 0
Else you can also mount it in the command line to test it:
mount -t vfat -o uid=john,gid=samba,umask=000,utf8 /dev/hdb1 /samba_backups

Don't forget to put the users that you want to have access to it in 
the 'samba' group.
I have tested it and it works beautifully without any single problem. I have 
tested all combinations possible by writing from linux to FAT, samba to FAT, 
windows 95-XP to FAT and all keep the accents and long names without any 
problem. We can take a common FAT32 disk with all kind of long and accentuated 
file names and they will just appear exactly the same on the samba shared 
resource.
It couldn't be better !

Thanks for this great Samba project and congratulations !

Regards,
Daniel