1

I'm trying to set up an ftp server on my Raspi. But UTF-8 filenames are not shown correctly. UTF-8 characters ( Japanese ) are shown as question marks only. The ftp server uses an external usb-memory as storage.

  • FTP-daemon: vsftpd
  • OS-Version: Raspbian GNU/Linux 10 (buster)
  • FTP-Access: Filezilla, Nautilus
  • Memory, that's accesses through ftp: USB-memory, mouted as vFAT
  • config in /etc/vsftpd.conf:
    • utf8_filesystem=YES

If I access the raspi via ssh (xfce4-terminal) characters from files on the usb memory are also shown as question marks. Looking at file from the local storage (ext4), they seem to be shown as unicode-coding(?) ( becomes ''$'\347\247\201')

Is there any setting, that I missed out?

edit: Putting the USB memory directly in my ubuntu pc shows all filenames without problems.

Tag: Encoding, UTF-8, Unicode, ftpd, ftp-server (none of these or equivalent tags exist, so I put them here)

  • Why did you install vsftpd? Raspbian (at least any reasonably up-to-date version) needs no additional software for ftp access. – Milliways Sep 24 at 6:42
  • In general display problems are due to the limitations of the font in use on the client. – Milliways Sep 24 at 6:50
  • FAT only allows 8 bit characters in filenames (although exFAT uses Unicode) – Milliways Sep 24 at 7:13
  • (1) xfce4-terminal and nautilus can show utf-8 filenames, it should not be a font limitation (2) Putting the USB stick with the files directly in my PC (ubuntu) allows me to see all filenames in Japanese. So it should be no problem caused by the file system (maybe it was formatted wit exFAT) [ added this information to the question] – DarkTrick Sep 25 at 1:31
  • \347\247\201 is CJK UNIFIED IDEOGRAPH-79C1 but the fact that it can be displayed on a system DOES NOT prove it is UTF-8 - it may have a suitable 8bit code set. This question has insufficient information and too many unknows for anyone to answer. – Milliways Sep 25 at 4:08
2

I solved the problem by mounting the usb memory with utf8 option.

/etc/fstab

/dev/sda1  /ftpserver/Data  vfat   rw,exec,utf8,umask=0000    0    0

edit: Extension: In general you need to enable utf8 in all of the following places:

  • On the storage itself
  • At mounting time ( as stated here )
  • ( If you want to see/check your files via console, the console must also support utf-8. The default bash(?) of ubuntu or raspberian does not support utf-8)
  • At the client (ftp client, ssh client (if connecting for setup / check))
0

I have Pure-FTPd installed in my Rpi4B raspbian 10 buster 2019jul10 version. I am using PC Win10 Chinese version every day.

I have no problem transferring files with file names in Chinese to the Rpi4B Pure-FTPd server. I don't see funny characters.

For naming files in Chinese, I use Unicode, or UTF-16LE. UTF-8 won't work, giving funny characters.

I have not tried VSftpd, but I know usually even working drivers/daemons might not work anymore when you have upgraded you raspbian, stretch to buster, for example.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.