I have an Ubuntu server that is hosting some .png
files using SFTP.
When I try to access those files from my Windows laptop, using FileZilla, or WinSCP, the files are not transferred successfully if Force UTF-8
is checked (Site Manager → Custom Charset):
The files are from VisualCron, running on a Windows Server, and while I've changed the encoding to UTF-8 in VisualCron, I'm unsure it's applying since that's the only place they could start being encoded differently.
- OpenSSH
sshd_config
:# AcceptEnv LANG LC_* Subsystem sftp = /usr/lib/openssh/sftp-server -l INFO Match Group = sftp_users ChrootDirectory = /ftproot/owners/%u ForceCommand = internal-sftp
Note that I have commented out: AcceptEnv LANG LC_*
. According to here, this means the server will not allow the client to pass locale environment variables. In this case, even if the Windows Server using VisualCron would send files using a 'wrong' encoding, the server should not accept it, and use UTF-8. Right?
- Ubuntu server's locale settings:
LANG = en_US.UTF-8 language = LC_CTYPE = "en_US.UTF-8" LC_NUMERIC = "en_US.UTF-8" LC_TIME = "en_US.UTF-8" LC_COLLATE = "en_US.UTF-8" LC_MONETARY = "en_US.UTF-8" LC_MESSAGES = "en_US.UTF-8" LC_PAPER = "en_US.UTF-8" LC_NAME = "en_US.UTF-8" LC_ADDRESS = "en_US.UTF-8" LC_TELEPHONE = "en_US.UTF-8" LC_MEASUREMENT = "en_US.UTF-8" LC_IDENTIFICATION = "en_US.UTF-8" LC_ALL =
- FileZilla:
When usingISO-8859-15
, files containing characters likeè
andé
in the filename are transferred, but transferring files withForce UTF-8
enabled errors with:Response: New directory is: "/tickets/" Command: get "FILENAME containing Liège.png" "C:\test\FILENAME containing Liège.png" Error: /tickets/FILENAME containing Liège.png: open for read: no such file or directory Error: File transfer failed
Where can I see what encoding my SFTP server uses for file listings and how can I change it to UTF-8?