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