Testet against Samba 3.0.21b and Samba 3.0.23d server. [root@shirkan ~]# uname -a Linux shirkan.localdomain 2.6.19 #1 Fri Dec 1 17:11:26 CET 2006 i686 athlon i386 GNU/Linux [root@shirkan ~]# mount -t cifs //hathi/home /mnt -o user=oli Password: [root@shirkan ~]# ls -la /mnt/tmp total 4 drwx------+ 2 oli Domain Users 0 Dec 4 2006 . drwx------+ 36 oli Domain Users 0 Dec 4 2006 .. -rw------- 1 oli Domain Users 16 Dec 4 2006 foo.bar:1,3 [root@shirkan ~]# ls -la /mnt/tmp/foo.bar\:1\,3 -rw------- 1 oli Domain Users 16 Dec 4 2006 /mnt/tmp/foo.bar:1,3 [root@shirkan ~]# cat /mnt/tmp/foo.bar\:1\,3 test test test [root@shirkan ~]# umount /mnt [root@shirkan ~]# mount -t cifs //hathi/home /mnt -o user=oli,mapchars Password: [root@shirkan ~]# ls -la /mnt/tmp ls: /mnt/tmp/foo.bar:1,3: No such file or directory total 4 drwx------+ 2 oli Domain Users 0 Dec 4 2006 . drwx------+ 36 oli Domain Users 0 Dec 4 2006 .. -rw------- 1 oli Domain Users 16 Dec 4 2006 foo.bar:1,3 [root@shirkan ~]# ls -la /mnt/tmp/foo.bar\:1\,3 ls: /mnt/tmp/foo.bar:1,3: No such file or directory [root@shirkan ~]# cat /mnt/tmp/foo.bar\:1\,3 cat: /mnt/tmp/foo.bar:1,3: No such file or directory [root@shirkan ~]# umount /mnt Filenames with a literal comma are used by kmail for the mail-folders. Best regards, Oli
I do not think ',' is the problem here, it is ':', one of the characters that gets remapped to higher than 0xf000 with unicode. So a file created with a character like : without mapchars mount options can't be accessed when the mount is with mapchars option because they are created/represented as two different files on the samba server.
I agree with Shirish S. Pargaonkar, and the explanation for the problem. Finally thinking I missunderstood the mapchar-option when writing this bug-report. It's intended use is, when you have linux/posix clients (and files with cifs-forbidden letters like :/ ) but _not_ a samba file-server (like windows-shares). Is this right? If no further comments arrive, I'll close this report in a view days.
Okay, my last comment about the intent of mapchars was not fully correct. I should have read the manpage of mount.cifs twice. Sorry for that.
As Steve suggested, "If your server supports posix path names/characters - do not use mapchars (we may need to make this more clear in documentation)" That is the case here I think.
A bit more clarification like the words from Steve in the man-pages would be great. Maybe it should also be stated clearly, that files created when mounting with mapchars may not be accessible from other clients or when mounting without mapchars. So you have to think twice when you move/copy files from a non-posix to a posix file server.
If a server supports unix extensions but not posix paths (old samba servers like 3.0.10), mapchars option is needed to create such a path on the server. If a server supports unix extensions and posix paths, (newer samba servers like 3.2.5), mapchars option is not needed to create such a path on the server. If a server does not support unix extension (Windows server like Windows 2003 Server), mapchars optoin is needed to create such a path on the server. By default, a character such as : is not mapped i.e. mapchars option is off. But if mapchars mount option is used, even if a server supports unix extensions, a character such as : is mapped. A path name created with mapchars mount option with characters such as : on a share, when that share is mounted without mapchars mount option, the path is not legible but can not think of a way to inform the client to use mampchars mount option (except the change in manpage documentation of mount command which I posted to the cifs mailing list as a patch).
Patch to clarify mapchars option is now in samba master branch. Closing as FIXED.