in old times of smbfs I use codepage and iocharset options, but cifs does not support codepage. What I can do?
-
You can upgrade the server to support Unicode. – u1686_grawity Nov 02 '10 at 14:11
-
Comments for the bounty: I have essentially the same problem, in windows the file names show as expected, but in linux they show with a lot of weird characters. I tried various iocharset settings, to no avail. I don't control the server. – Peltier Jun 17 '11 at 08:24
-
@harrymc: I'm using a rather old version of linux: Ubuntu Hardy Heron. Is there a way I can find out what OS the server is running? The windows client that works is an XP virtual machine running on the linux box. – Peltier Jun 19 '11 at 19:04
-
@harrymc: smbclient -L fails with the following error:session setup failed: NT_STATUS_LOGON_FAILURE – Peltier Jun 20 '11 at 09:17
-
I can't seem to find any relevant information through the windows "My Network Places". – Peltier Jun 20 '11 at 09:18
-
I found out one thing: the server appears to be a Windows 2000 server machine. – Peltier Jun 20 '11 at 09:22
-
@harrymc: I don't think it does, because my terminal already displays properly the names of local file systems. I don't know whether the distant file system is FAT or NTFS; how can I tell? – Peltier Jun 21 '11 at 08:09
-
@harrymc: then I guess the filesystem is NTFS :-/ – Peltier Jun 21 '11 at 14:58
-
1This maybe me being thick, but if mounting with SMBFS used to work, and CIFS does not work, then why not just keep using SMBFS? – Kirk Jun 22 '11 at 03:45
-
@Kirk : smbfs gives me permission problems – Peltier Jun 22 '11 at 14:20
-
@harrymc: I just retried with iocharset=utf8, and this time it worked, no idea what changed. here is the relevant line in the fstab://xxx.xxx.com/Documents$ /documents cifs noauto,user,users,username=xxx/xxx,uid=1000,gid=1000,iocharset=utf8 0 0. Please post your answer as an answer and I will award you the bounty :) – Peltier Jun 22 '11 at 14:22
2 Answers
I suppose your problem is with the file-names showing up with funny characters for an NTFS share.
According to the NTFS FAQ, the mount command supports the iocharset parameter for NTFS. You should pay particular attention to section 4 and try the mount commands given there.
In another article : smbfs & cifs; accentuated characters; solved, the author proposes three possibilities for mounting such shares :
mount //192.168.15.123/a /home/b/c -t cifs -o username=d,password=e,uid=f,gid=g,iocharset=utf8
mount //192.168.15.123/a /home/b/c -t cifs -o username=d,password=e,uid=f,gid=g,iocharset=utf8,codepage=cp437
mount //192.168.15.123/a /home/b/c -t cifs -o username=d,password=e,uid=f,gid=g,iocharset=utf8,codepage=cp850
For more info, the above article describes the author's consecutive tries and logic, until he got this working for him.
- 455,459
- 31
- 526
- 924
Just to mention, make sure it's not a ssh setting that is badly set.
Just spent a whole night trying to figure out how to solve this. Mounting a Window 8.1 NTFS folder with french character (é,è) was causing my ls to display :
instead of
Turn out problem was that Putty default Window->Translation->Remote character set was set to ISO-8859-1. Once I changed it to UTF-8 everything displayed correctly.
Just keep it in mind if you always remote in like I do. Take 5 sec to test it out on a local shell before you spend an enjoyable evening reading and digging thru the microsoft NTFS code page tech documentation to try to figure out what your local Windows NTFS partition code page is set to so you can set the correct code page in the iocharset cifs argument :)
- 11
- 1