github.com/xhghs/rclone@v1.51.1-0.20200430155106-e186a28cced8/docs/content/ftp.md (about)

     1  ---
     2  title: "FTP"
     3  description: "Rclone docs for FTP backend"
     4  date: "2017-01-01"
     5  ---
     6  
     7  <i class="fa fa-file"></i> FTP
     8  ------------------------------
     9  
    10  FTP is the File Transfer Protocol. FTP support is provided using the
    11  [github.com/jlaffaye/ftp](https://godoc.org/github.com/jlaffaye/ftp)
    12  package.
    13  
    14  Here is an example of making an FTP configuration.  First run
    15  
    16      rclone config
    17  
    18  This will guide you through an interactive setup process. An FTP remote only
    19  needs a host together with and a username and a password. With anonymous FTP
    20  server, you will need to use `anonymous` as username and your email address as
    21  the password.
    22  
    23  ```
    24  No remotes found - make a new one
    25  n) New remote
    26  r) Rename remote
    27  c) Copy remote
    28  s) Set configuration password
    29  q) Quit config
    30  n/r/c/s/q> n
    31  name> remote
    32  Type of storage to configure.
    33  Enter a string value. Press Enter for the default ("").
    34  Choose a number from below, or type in your own value
    35  [snip]
    36  XX / FTP Connection
    37     \ "ftp"
    38  [snip]
    39  Storage> ftp
    40  ** See help for ftp backend at: https://rclone.org/ftp/ **
    41  
    42  FTP host to connect to
    43  Enter a string value. Press Enter for the default ("").
    44  Choose a number from below, or type in your own value
    45   1 / Connect to ftp.example.com
    46     \ "ftp.example.com"
    47  host> ftp.example.com
    48  FTP username, leave blank for current username, ncw
    49  Enter a string value. Press Enter for the default ("").
    50  user> 
    51  FTP port, leave blank to use default (21)
    52  Enter a string value. Press Enter for the default ("").
    53  port> 
    54  FTP password
    55  y) Yes type in my own password
    56  g) Generate random password
    57  y/g> y
    58  Enter the password:
    59  password:
    60  Confirm the password:
    61  password:
    62  Use FTP over TLS (Implicit)
    63  Enter a boolean value (true or false). Press Enter for the default ("false").
    64  tls> 
    65  Remote config
    66  --------------------
    67  [remote]
    68  type = ftp
    69  host = ftp.example.com
    70  pass = *** ENCRYPTED ***
    71  --------------------
    72  y) Yes this is OK
    73  e) Edit this remote
    74  d) Delete this remote
    75  y/e/d> y
    76  ```
    77  
    78  This remote is called `remote` and can now be used like this
    79  
    80  See all directories in the home directory
    81  
    82      rclone lsd remote:
    83  
    84  Make a new directory
    85  
    86      rclone mkdir remote:path/to/directory
    87  
    88  List the contents of a directory
    89  
    90      rclone ls remote:path/to/directory
    91  
    92  Sync `/home/local/directory` to the remote directory, deleting any
    93  excess files in the directory.
    94  
    95      rclone sync /home/local/directory remote:directory
    96  
    97  ### Modified time ###
    98  
    99  FTP does not support modified times.  Any times you see on the server
   100  will be time of upload.
   101  
   102  ### Checksums ###
   103  
   104  FTP does not support any checksums.
   105  
   106  #### Restricted filename characters
   107  
   108  In addition to the [default restricted characters set](/overview/#restricted-characters)
   109  the following characters are also replaced:
   110  
   111  File names can also not end with the following characters.
   112  These only get replaced if they are last character in the name:
   113  
   114  | Character | Value | Replacement |
   115  | --------- |:-----:|:-----------:|
   116  | SP        | 0x20  | ␠           |
   117  
   118  Note that not all FTP servers can have all characters in file names, for example:
   119  
   120  | FTP Server| Forbidden characters |
   121  | --------- |:--------------------:|
   122  | proftpd   | `*`                  |
   123  | pureftpd  | `\ [ ]`              |
   124  
   125  ### Implicit TLS ###
   126  
   127  FTP supports implicit FTP over TLS servers (FTPS). This has to be enabled
   128  in the config for the remote. The default FTPS port is `990` so the
   129  port will likely have to be explictly set in the config for the remote.
   130  
   131  <!--- autogenerated options start - DO NOT EDIT, instead edit fs.RegInfo in backend/ftp/ftp.go then run make backenddocs -->
   132  ### Standard Options
   133  
   134  Here are the standard options specific to ftp (FTP Connection).
   135  
   136  #### --ftp-host
   137  
   138  FTP host to connect to
   139  
   140  - Config:      host
   141  - Env Var:     RCLONE_FTP_HOST
   142  - Type:        string
   143  - Default:     ""
   144  - Examples:
   145      - "ftp.example.com"
   146          - Connect to ftp.example.com
   147  
   148  #### --ftp-user
   149  
   150  FTP username, leave blank for current username, $USER
   151  
   152  - Config:      user
   153  - Env Var:     RCLONE_FTP_USER
   154  - Type:        string
   155  - Default:     ""
   156  
   157  #### --ftp-port
   158  
   159  FTP port, leave blank to use default (21)
   160  
   161  - Config:      port
   162  - Env Var:     RCLONE_FTP_PORT
   163  - Type:        string
   164  - Default:     ""
   165  
   166  #### --ftp-pass
   167  
   168  FTP password
   169  
   170  - Config:      pass
   171  - Env Var:     RCLONE_FTP_PASS
   172  - Type:        string
   173  - Default:     ""
   174  
   175  #### --ftp-tls
   176  
   177  Use FTP over TLS (Implicit)
   178  
   179  - Config:      tls
   180  - Env Var:     RCLONE_FTP_TLS
   181  - Type:        bool
   182  - Default:     false
   183  
   184  ### Advanced Options
   185  
   186  Here are the advanced options specific to ftp (FTP Connection).
   187  
   188  #### --ftp-concurrency
   189  
   190  Maximum number of FTP simultaneous connections, 0 for unlimited
   191  
   192  - Config:      concurrency
   193  - Env Var:     RCLONE_FTP_CONCURRENCY
   194  - Type:        int
   195  - Default:     0
   196  
   197  #### --ftp-no-check-certificate
   198  
   199  Do not verify the TLS certificate of the server
   200  
   201  - Config:      no_check_certificate
   202  - Env Var:     RCLONE_FTP_NO_CHECK_CERTIFICATE
   203  - Type:        bool
   204  - Default:     false
   205  
   206  #### --ftp-disable-epsv
   207  
   208  Disable using EPSV even if server advertises support
   209  
   210  - Config:      disable_epsv
   211  - Env Var:     RCLONE_FTP_DISABLE_EPSV
   212  - Type:        bool
   213  - Default:     false
   214  
   215  #### --ftp-encoding
   216  
   217  This sets the encoding for the backend.
   218  
   219  See: the [encoding section in the overview](/overview/#encoding) for more info.
   220  
   221  - Config:      encoding
   222  - Env Var:     RCLONE_FTP_ENCODING
   223  - Type:        MultiEncoder
   224  - Default:     Slash,Del,Ctl,RightSpace,Dot
   225  
   226  <!--- autogenerated options stop -->
   227  
   228  ### Limitations ###
   229  
   230  Note that since FTP isn't HTTP based the following flags don't work
   231  with it: `--dump-headers`, `--dump-bodies`, `--dump-auth`
   232  
   233  Note that `--timeout` isn't supported (but `--contimeout` is).
   234  
   235  Note that `--bind` isn't supported.
   236  
   237  FTP could support server side move but doesn't yet.
   238  
   239  Note that the ftp backend does not support the `ftp_proxy` environment
   240  variable yet.
   241  
   242  Note that while implicit FTP over TLS is supported,
   243  explicit FTP over TLS is not.