breno.moiana@partekforest.com
2004-Jan-27 19:27 UTC
[Samba] Samba as a client to Windows2000 + special characters on filenames
Greetings! I have been troubleshooting this for over a week, and what follows is a rather long, detailed description. The short description to the problem I have been dealing with is: I can't access files on a windows2000 server from a Linux client when their filenames have some specific special characters such as "?" I can list them, but not copy. The setup: server: Windows 2000 (EN) with Service Pack 3 client: Debian Sarge (testing) with Samba 3.0 and kernel 2.4.22 To mount the filesystem, I am (successfully) using: [breno@intra:/testing]# mount -t smbfs -o username=user,password=pass,ro,codepage=cp860 //servername/sharename /testing/smbmnt/ The read-only is so that I don't want to tinker in writing until I can at least read my files correctly. To map the problem, I have set up on my Windows server a directory with files meant to check out all the troubled characters: --------------cut here--- F:\teste>dir O volume na unidade F ? Servidor O n?mero de s?rie do volume ? A4EE-7579 Pasta de F:\teste 27/01/2004 14:44 <DIR> . 27/01/2004 14:44 <DIR> .. 19/08/2003 13:18 101.481 A tilde_?_.test 19/08/2003 13:18 101.481 aacute_?_.test 19/08/2003 13:18 101.481 acirc_?_.test 19/08/2003 13:18 101.481 agrave_?_.test 19/08/2003 13:18 101.481 atilde_?_.test 19/08/2003 13:18 101.481 C cedil_?_.test 19/08/2003 13:18 101.481 ccedil_?_.test 19/08/2003 13:18 101.481 ecirc_?_.test 19/08/2003 13:18 101.481 iacute_?_.test 19/08/2003 13:18 101.481 oacute_?_.test 19/08/2003 13:18 101.481 ocirc_?_.test 19/08/2003 13:18 101.481 uacute_?_.test 19/08/2003 13:18 101.481 uuml_?_.test 13 arquivo(s) 1.319.253 bytes 2 pasta(s) 2.514.542.592 bytes dispon?veis F:\teste> --------------cut here--- Now I try to copy them all to a directory. With codepage=cp437(US/Canada), cp850(Europe) or cp860(Portuguese)I get errors on std_err: smb_open: PATH/A tilde_A_.test open failed, result=-2 smb_open: PATH/A tilde_A_.test open failed, result=-2 smb_readpage_sync: PATH/A tilde_A_.test open failed, result=-2 which repeats for the atilde_a_.test file. Then, ls -l on the target directory returns: --------------cut here--- [breno@intra:/testing]# ls -l cp860/ total 1100 -rwxr--r-- 1 breno breno 0 Jan 27 15:29 A tilde_A_.test -rwxr--r-- 1 breno breno 101481 Jan 27 15:29 C cedil_?_.test -rwxr--r-- 1 breno breno 101481 Jan 27 15:29 aacute_?_.test -rwxr--r-- 1 breno breno 101481 Jan 27 15:29 acirc_?_.test -rwxr--r-- 1 breno breno 101481 Jan 27 15:29 agrave_?_.test -rwxr--r-- 1 breno breno 0 Jan 27 15:29 atilde_a_.test -rwxr--r-- 1 breno breno 101481 Jan 27 15:29 ccedil_?_.test -rwxr--r-- 1 breno breno 101481 Jan 27 15:29 ecirc_?_.test -rwxr--r-- 1 breno breno 101481 Jan 27 15:29 iacute_?_.test -rwxr--r-- 1 breno breno 101481 Jan 27 15:29 oacute_?_.test -rwxr--r-- 1 breno breno 101481 Jan 27 15:29 ocirc_?_.test -rwxr--r-- 1 breno breno 101481 Jan 27 15:29 uacute_?_.test -rwxr--r-- 1 breno breno 101481 Jan 27 15:29 uuml_?_.test [breno@intra:/testing]# --------------cut here--- Notice that only the ? and ? files have a zero filesize. These are the ones who didnt work. The others were successfully copied, though the console is not able to display them. This is a different problem, to be addressed separately (but any tips are welcome as well). When I tried utf8 and iso8859-1 codepages, the only files that would be copied were the acute-related ones (?, ?, ?, ?, ?). I have compiled a 2.4.22 kernel with the mentioned codepages included in the Filesystems section, and it is working fine. Has anybody managed to make this work correctly? Thanks for any help :) Regards, Breno Moiana ------------------------------------------------------------- "Science is organized knowledge. Wisdom is organized life." "Ci?ncia ? conhecimento organizado. Sabedoria ? vida organizada." -- Immanuel Kant
Andrew Bartlett
2004-Jan-27 22:38 UTC
[Samba] Samba as a client to Windows2000 + special characters on filenames
On Wed, 2004-01-28 at 07:27, breno.moiana@partekforest.com wrote:> Greetings! > > I have been troubleshooting this for over a week, and what follows is a rather > long, detailed description. The short description to the problem I have been > dealing with is: I can't access files on a windows2000 server from a Linux > client when their filenames have some specific special characters such as "?" I > can list them, but not copy. > > The setup: > server: Windows 2000 (EN) with Service Pack 3 > client: Debian Sarge (testing) with Samba 3.0 and kernel 2.4.22 > > To mount the filesystem, I am (successfully) using: > [breno@intra:/testing]# mount -t smbfs -o > username=user,password=pass,ro,codepage=cp860 //servername/sharename > /testing/smbmnt/You will always get nasty character set issues with smbfs. The CIFS VFS should be better in that regard, as it will allow you to use unicode on the wire. That, and UTF8 locally (ie, make that your LOCALLE), will get you a much better result. Andrew Bartlett -- Andrew Bartlett abartlet@pcug.org.au Manager, Authentication Subsystems, Samba Team abartlet@samba.org Student Network Administrator, Hawker College abartlet@hawkerc.net http://samba.org http://build.samba.org http://hawkerc.net -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 189 bytes Desc: This is a digitally signed message part Url : http://lists.samba.org/archive/samba/attachments/20040128/2d4d2dfc/attachment.bin
breno.moiana@partekforest.com
2004-Jan-28 16:56 UTC
[Samba] Samba as a client to Windows2000 + special characters on filenames
Thanks for the help, Andrew! It's not ready yet, but I am one step closer :D Okay, let's go to part II :)>> I have been troubleshooting this for over a week, and what follows is arather>> long, detailed description. The short description to the problem I have been >> dealing with is: I can't access files on a windows2000 server from a Linux >> client when their filenames have some specific special characters such as "?"I>> can list them, but not copy. >> >> The setup: >> server: Windows 2000 (EN) with Service Pack 3 >> client: Debian Sarge (testing) with Samba 3.0 and kernel 2.4.22 >> >> To mount the filesystem, I am (successfully) using: >> [breno@intra:/testing]# mount -t smbfs -o >> username=user,password=pass,ro,codepage=cp860 //servername/sharename >> /testing/smbmnt/ > >You will always get nasty character set issues with smbfs. The CIFS VFS >should be better in that regard, as it will allow you to use unicode on >the wire. That, and UTF8 locally (ie, make that your LOCALLE), will get >you a much better result.I have compiled CIFS into the kernel, no probs with that. Have also set up mount.cifs on /sbin as required by the instructions from samba's CIFS page. Now I can mount the remote share with "mount -t cifs -o usernname=user,password=pass,codepage=utf8 //server/share /testing/dir". I can list the files (as before) but now, when I try to copy one 'clean' file, with no special chars on its name, the system kind of hangs up. Numlock, Capslock etc still respond, but no keyboard, no SSHing into the machine, nothing. A finger on the power button is the only choice left. I followed cifs' documentation, and it seems to work fine, except that I can't access the files, just list them. Ideas? Regards, Breno Moiana ------------------------------------------------------------- "Science is organized knowledge. Wisdom is organized life." "Ci?ncia ? conhecimento organizado. Sabedoria ? vida organizada." -- Immanuel Kant