curlftpfs错误地复制文件/ dirnames

时间:2017-06-28 10:54:44

标签: linux ftp ftp-client curlftpfs

所以有一个ftp服务器(在Windows上运行),我需要在我的vps上同步一些数据。我一直在使用curlftpfs + rsync成功完成这项任务,但最近我不得不添加新目录来进行同步,我的结果非常奇怪。

所以当我使用ftp protocl访问ftp服务器时,我可以看到以下内容:

$ ftp FTP_HOST
Connected to FTP_HOST (FTP_HOST_IP).
220 Microsoft FTP Service
331 Password required
230 User logged in.
Remote system type is Windows_NT.
ftp> cd "mpr/Monthly Production Reports"
250 CWD command successful.
ftp> ls
227 Entering Passive Mode (10,47,12,185,245,161).
125 Data connection already open; Transfer starting.
02-28-16  11:03PM       <DIR>          OLD
05-10-16  02:44PM       <DIR>          2016 - 01 XYZ Abc
05-10-16  02:44PM       <DIR>          2016 - 02 XYZ Abc
05-10-16  02:44PM       <DIR>          2016 - 03 XYZ Abc
03-07-17  01:11PM       <DIR>          2016 - 10 XYZ Abc
05-10-16  02:44PM       <DIR>          2015 - 12 XYZ Abc
04-01-16  02:47PM              6049686 M�n.pptx
06-13-17  01:31PM       <DIR>          2016 - 12 XYZ Abc
05-11-17  05:29PM       <DIR>          2017 - 01 XYZ Abc
05-11-17  05:28PM       <DIR>          2017 - 02 XYZ Abc
06-28-17  10:38AM       <DIR>          2017 - 04 XYZ Abc
05-11-17  05:34PM       <DIR>          2017 - 03 XYZ Abc
226 Transfer complete.

当我使用curlftpfs时,我可以看到以下内容:

$ curlftpfs "FTP_HOST/mpr/Monthly Production Reports/" "/mnt/ftp3" -o utf8,cache=no -v 
* About to connect() to FTP_HOST port 21 (#0)
*   Trying FTP_HOST_IP...
* Connected to FTP_HOST (FTP_HOST_IP) port 21 (#0)
< 220 Microsoft FTP Service
> USER _USER_
< 331 Password required
> PASS _PASSWORD_
< 230 User logged in.
> PWD
< 257 "/" is current directory.
* Entry path is '/'
> OPTS UTF8 ON
* ftp_perform ends with SECONDARY: 0
< 200 OPTS UTF8 command successful - UTF8 encoding now ON.
> CWD mpr
< 250 CWD command successful.
> CWD Monthly Production Reports
< 250 CWD command successful.
* Remembering we are in dir "mpr/Monthly Production Reports/"
* Connection #0 to host FTP_HOST left intact


$ ls /mnt/ftp3
-r-xr-xrwx. 5 root root    2017 Jun 28 01:00  Abc
-r-xr-xrwx. 5 root root    2017 Jun 28 01:00  Abc
-r-xr-xrwx. 5 root root    2017 Jun 28 01:00  Abc
-r-xr-xrwx. 5 root root    2017 Jun 28 01:00  Abc
-r-xr-xrwx. 5 root root    2017 Jun 28 01:00  Abc
-r-xr-xrwx. 5 root root    2017 Jun 28 01:00  Abc
-r-xr-xrwx. 5 root root    2017 Jun 28 01:00  Abc
-r-xr-xrwx. 5 root root    2017 Jun 28 01:00  Abc
-r-xr-xrwx. 5 root root    2017 Jun 28 01:00  Abc
-r-xr-xrwx. 5 root root    2017 Jun 28 01:00  Abc
----------. 1 root root 6049686 Apr  1  2016 Mån.pptx
d---------. 1 root root       0 Feb 28  2016 OLD

是否有人知道是什么原因导致curlftpfs将这些目录读取为文件并更改其名称?

1 个答案:

答案 0 :(得分:0)

使用了lftp及其镜像选项。

https://lftp.yar.ru/lftp-man.html