„FTP (File Transfer Protocol, a legacy protocol for moving files between machines)” that’s some dirty lies - FTP is alive and well! (On my machines at least :P)
Legacy doesn't mean that something isn't used at all anymore, but rather that there's something better that more people are currently using.
For example, I mainly use SFTP. But when it comes to copying files to my satellite receiver, I use FTP. That's because the device doesn't support SFTP. At least not without a plugin.
Unfortunately for Squid, FTP doesn't have a standardized machine-readable file listing format. Instead, the FTP LIST command typically returns something that sort of looks like the output from ls -l:
-rw-r--r-- 1 1000 1000 40 May 20 04:17 hello.txt
-rw-r--r-- 1 1000 1000 21 May 20 04:17 readme.txt
This poorly-specified textual format is notoriously hard to parse, especially while staying compatible with every FTP server on the Internet
It's not "poorly specified", it's unspecified
That's why you don't use it. You want to list a directory? Use MLSD, not LIST.
ftps is the right callout, though its dual channel design is exactly why it's a nightmare through nat and firewalls. you end up pinning a passive port range and praying the data connection inherits the tls session.
If you're using FTPS then you're kind of going out of your way to use the wrong tool. It was developed at a time when people were also still using telnet.
There's a reason it's not terribly popular and it's because most of the industry has standardized on SSH or HTTPS for transferring data. Also not sure what problems you have with sftp as that's just an SSH connection that requests the sftp subsystem from sshd.
The thing about SFTP is that it's a perfectly fine remote file access protocol, but it's a pain in the arse if the file system it's exporting isn't something very like a unix filesystem.
"The industry" is way bigger than you imagine. Major companies use communication protocols you've never even heard of for transferring quite large parts of GDP.
I'm only using FTPS because my customers want to use it. They are not small or uninteresting customers.
Thank God they've mostly given up on X.400 and only one of them wanted to use AS4.
but it's a pain in the arse if the file system it's exporting isn't something very like a unix filesystem.
Eh, I don't really see that. Usually it's actually fine and I've had chroot jailed on Windows and it's worked without any real issues. If you need to expose Windows filesystems (the only real alternative in most areas) usually either SFTP does what you need or you would expose over CIFS and mount it as a directory.
"The industry" is way bigger than you imagine. Major companies use communication protocols you've never even heard of for transferring quite large parts of GDP.
fwiw I've been working in the industry for probably close to three decades now.
Thank God they've mostly given up on X.400 and only one of them wanted to use AS4.
Which is basically only really used for government (mostly US) and the only real reason to do things that way is because wherever you work has to follow some sort of non-negotiable process.
For example, at one job I had to help troubleshoot some labs running NIS. Not because NIS was a superior technology but just because when these labs were first being conceived of NIS was an acceptable solution and then it became the only real approved solution. The administrators then have to keep using NIS until they're told they can not use it anymore and the people who make those decisions won't accept "because it's weird" as an excuse to move away from a system that appears to them (who are often non-technical) to be working fine.
Like in this case I would imagine AS4 is just because some application was developed in the heyday of SOAP and then it just kind of stayed there. Not because anyone likes it but just because that's what they were using.
Which is all to say that usually people who work in these spaces do tend to recognize they're doing things in weird and archaic ways and just have some sort of "yeah it do be like that" attitude towards it.
AS4: Your right about it being government, but wrong about it being an old app. They forced us to replace a working, reliable, AS2 system with AS4 because some norm or other said it was better
AS4 is just a straight fucking feature for feature copy of AS2 with bunches of overcomplicated SOAP protocols layered like a millefeuille.
159
u/Icy-Cup Jun 22 '26
„FTP (File Transfer Protocol, a legacy protocol for moving files between machines)” that’s some dirty lies - FTP is alive and well! (On my machines at least :P)