Gentoo Archives: gentoo-user

From: lee <lee@××××××××.de>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] Re: replacement for ftp?
Date: Sun, 14 May 2017 02:22:53
Message-Id: 874lwoci5u.fsf@heimdali.yagibdah.de
In Reply to: [gentoo-user] Re: replacement for ftp? by Kai Krakow
1 Kai Krakow <hurikhan77@×××××.com> writes:
2
3 > Am Sat, 29 Apr 2017 20:38:24 +0100
4 > schrieb lee <lee@××××××××.de>:
5 >
6 >> Kai Krakow <hurikhan77@×××××.com> writes:
7 >>
8 >> > Am Tue, 25 Apr 2017 15:29:18 +0100
9 >> > schrieb lee <lee@××××××××.de>:
10 >> >
11 >> >> since the usage of FTP seems to be declining, what is a replacement
12 >> >> which is at least as good as FTP?
13 >> >>
14 >> >> I'm aware that there's webdav, but that's very awkward to use and
15 >> >> missing features.
16 >> >
17 >> > If you want to sync files between two sites, try rsync. It is
18 >> > supported through ssh also. Plus, it's very fast also.
19 >>
20 >> Yes, I'm using it mostly for backups/copies.
21 >>
22 >> The problem is that ftp is ideal for the purpose, yet users find it
23 >> too difficult to use, and nobody uses it. So there must be something
24 >> else as good or better which is easier to use and which ppl do use.
25 >
26 > Well, I don't see how FTP is declining, except that it is unencrypted.
27 > You can still use FTP with TLS handshaking, most sites should support
28 > it these days but almost none forces correct certificates because it is
29 > usually implemented wrong on the server side (by giving you
30 > ftp.yourdomain.tld as the hostname instead of ftp.hostingprovider.tld
31 > which the TLS cert has been issued for). That makes it rather pointless
32 > to use. In linux, lftp is one of the few FTP clients supporting TLS
33 > out-of-the-box by default, plus it forces correct certificates.
34
35 These certificates are a very stupid thing. They are utterly
36 complicated, you have to self-sign them which produces warnings, and
37 they require to have the host name within them as if the host wasn't
38 known by several different names.
39
40 > But I found FTP being extra slow on small files, that's why I suggested
41 > to use rsync instead. That means, where you could use sftp (ssh+ftp),
42 > you can usually also use ssh+rsync which is faster.
43
44 That requires shell access.
45
46 What do you consider "small files"? I haven't observed a slowdown like
47 that, but I haven't been looking for it, either.
48
49 > There's also the mirror command in lftp, which can be pretty fast, too,
50 > on incremental updates but still much slower than rsync.
51 >
52 >> I don't see how they would transfer files without ftp when ftp is the
53 >> ideal solution.
54 >
55 > You simply don't. FTP is still there and used. If you see something
56 > like "sftp" (ssh+ftp, not ftp+ssl which I would refer to as ftps), this
57 > is usually only ftp wrapped into ssh for security reasons. It just
58 > using ftp through a tunnel, but to the core it's the ftp protocol. In
59 > the end, it's not much different to scp, as ftp is really just only a
60 > special shell with some special commands to setup a file transfer
61 > channel that's not prone to interact with terminal escape sequences in
62 > whatever way those may be implemented, something that e.g. rzsz needs
63 > to work around.
64 >
65 > In the early BBS days, where you couldn't establish a second transfer
66 > channel like FTP does it using TCP, you had to send special escape
67 > sequences to put the terminal into file transfer mode, and then send
68 > the file. By that time, you used rzsz from the remote shell to initiate
69 > a file transfer. This is more the idea of how scp implements a file
70 > transfer behind the scenes.
71
72 IIRC, I used xmodem or something like that back then, and rzsz never
73 worked.
74
75 > FTP also added some nice features like site-to-site transfers where the
76 > data endpoints both are on remote sites, and your local site only is
77 > the control channel. This directly transfers data from one remote site
78 > to another without going through your local connection (which may be
79 > slow due to the dial-up nature of most customer internet connections).
80
81 Interesting, I didn't know that. How do you do that?
82
83 > Also, FTP is able to stream multiple files in a single connection for
84 > transferring many small files, by using tar as the transport protocol,
85 > thus reducing the overhead of establishing a new connection per file.
86 > Apparently, I know only few clients that support that, and even fewer
87 > servers which that would with.
88 >
89 > FTP can be pretty powerful, as you see. It's just victim of its poor
90 > implementation in most FTP clients that makes you feel it's mostly
91 > declined. If wrapped into a more secure tunnel (TLS, ssh), FTP is still
92 > a very good choice for transferring files, tho not the most efficient.
93 > Depending on your use case, you get away much better using more
94 > efficient protocols like rsync.
95
96 So there isn't a better solution than ftp. That's good to know because
97 I can say there isn't a better solution, and if ppl don't want to use
98 it, they can send emails or DVDs.
99
100
101 --
102 "Didn't work" is an error.

Replies

Subject Author
[gentoo-user] Re: replacement for ftp? Kai Krakow <hurikhan77@×××××.com>
Re: [gentoo-user] Re: replacement for ftp? Kent Fredric <kentnl@g.o>