2

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)

7
  • Why did you install vsftpd? Raspbian (at least any reasonably up-to-date version) needs no additional software for ftp access.
    – Milliways
    Commented Sep 24, 2019 at 6:42
  • In general display problems are due to the limitations of the font in use on the client.
    – Milliways
    Commented Sep 24, 2019 at 6:50
  • FAT only allows 8 bit characters in filenames (although exFAT uses Unicode)
    – Milliways
    Commented Sep 24, 2019 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
    Commented Sep 25, 2019 at 1:31
  • 1
    Force UTF-8 on filezilla made access to folders with Japanese characters work!
    – Ray Foss
    Commented Oct 25, 2020 at 22:20

2 Answers 2

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 and acknowledge you have read our privacy policy.

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