But why? It's 2020. Why not use SFTP? Or Samba? Or NFS? Or any number of other file transfer/sharing methods that don't involve FTP?
I truly don't understand why FTP of all things is still a) in use 2) of interest and 3) considered a valid approach anymore. Can somebody help me understand why you'd want to go this route?
It still works; old devices that can only use FTP will benefit from it. For example, photocopiers often have FTP upload support for scans - so you can just slap an RPi onto it to convert that to a newer way of exchanging files.
Put it to you this way, pal: 99% of the time I'm doing containers on AWS, and 1% of the time I spend working in a factory with 8-bit Z80 powered machines that need to get files to/from a totally modern network. Little bits of legacy-adapting middleware are critical!
OpenSSH's SFTP server is significantly slower than FTP over Wireguard (or FTP over TLS) without the OpenSSH HPN patches (which upstream refuses to merge) on connections with >100ms latency.
FTP has sendfile support for data transfers since there is no framing in the data connection. (OpenSSL 3.0 has sendfile support so FTP over TLS would also benefit as well).
If you want to serve private content, you have to encrypt stuff and authenticate users.
If you want to serve public content, you still need to encrypt it to avoid a MITM attack.
SSH solves the first problem trivially, but is slower. HTTPS solves the second problem trivially, and the first problem with some work (login flow or client certificates).
I only see a case for FTP for underpowered hardware like older RPi serving stuff locally. But I suspect the bottleneck would be in the USB-connected NIC, not even im the CPU.
6 comments
[ 3.1 ms ] story [ 27.1 ms ] threadI truly don't understand why FTP of all things is still a) in use 2) of interest and 3) considered a valid approach anymore. Can somebody help me understand why you'd want to go this route?
Put it to you this way, pal: 99% of the time I'm doing containers on AWS, and 1% of the time I spend working in a factory with 8-bit Z80 powered machines that need to get files to/from a totally modern network. Little bits of legacy-adapting middleware are critical!
FTP has sendfile support for data transfers since there is no framing in the data connection. (OpenSSL 3.0 has sendfile support so FTP over TLS would also benefit as well).
If you want to serve public content, you still need to encrypt it to avoid a MITM attack.
SSH solves the first problem trivially, but is slower. HTTPS solves the second problem trivially, and the first problem with some work (login flow or client certificates).
I only see a case for FTP for underpowered hardware like older RPi serving stuff locally. But I suspect the bottleneck would be in the USB-connected NIC, not even im the CPU.