Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/redis/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
现有远程文件夹的LFTP镜像访问失败_Ftp_Lftp - Fatal编程技术网

现有远程文件夹的LFTP镜像访问失败

现有远程文件夹的LFTP镜像访问失败,ftp,lftp,Ftp,Lftp,我正在尝试使用LFTP镜像运行在Windows上的远程FTP(这就是我所知道的关于它的配置的所有信息。另外,我只有读取权限) 我正在运行以下shell脚本: #!/bin/bash HOST='omitted' USER='omitted' PASS='omitted' LOCALFOLDER="omitted" REMOTEFOLDER="/Initial data/Practice area/Intellectual Property/" lftp -f " debug -o debug

我正在尝试使用LFTP镜像运行在Windows上的远程FTP(这就是我所知道的关于它的配置的所有信息。另外,我只有读取权限)

我正在运行以下shell脚本:

#!/bin/bash
HOST='omitted'
USER='omitted'
PASS='omitted'
LOCALFOLDER="omitted"
REMOTEFOLDER="/Initial data/Practice area/Intellectual Property/"


lftp -f "
debug -o debug.text 9
open $HOST
user $USER $PASS
cd '$REMOTEFOLDER'
ls
mirror --reverse --verbose '$REMOTEFOLDER' '$LOCALFOLDER'
bye
"
运行后,我得到以下输出:

source: Is a directory
drwxr-xr-x 1 ftp ftp              0 Mar 23  2017 03.17.17 
drwxr-xr-x 1 ftp ftp              0 Nov 05  2016 2016.10.03
drwxr-xr-x 1 ftp ftp              0 Nov 05  2016 2016.10.07
drwxr-xr-x 1 ftp ftp              0 Feb 23  2017 2017.02.21
drwxr-xr-x 1 ftp ftp              0 Feb 26  2017 2017.02.24
drwxr-xr-x 1 ftp ftp              0 Mar 02  2017 2017.02.27
drwxr-xr-x 1 ftp ftp              0 Apr 11  2017 2017.03.17
drwxr-xr-x 1 ftp ftp              0 Mar 28  2017 2017.03.27
drwxr-xr-x 1 ftp ftp              0 Apr 04  2017 2017.03.31
drwxr-xr-x 1 ftp ftp              0 Aug 09 08:34 2017.04.06
drwxr-xr-x 1 ftp ftp              0 Jun 07  2017 2017.05.31
drwxr-xr-x 1 ftp ftp              0 Jul 17 10:52 2017.07.17
drwxr-xr-x 1 ftp ftp              0 Feb 19  2017 New Folder
mirror: Access failed: /Initial data/Practice area/Intellectual Property: No such file or directory
如您所见,我可以列出文件夹中要镜像的所有文件,但镜像命令失败

以下是调试输出:

---- Resolving host address...
---- 1 address found: <omitted>
---- Connecting to <omitted> (<omitted>) port <omitted>
<--- 220 Welcome to <omitted>
---> FEAT
<--- 211-Features:
<---  MDTM
<---  REST STREAM
<---  SIZE
<---  MLST type*;size*;modify*;
<---  MLSD
<---  UTF8
<---  CLNT
<---  MFMT
<--- 211 End
---> CLNT lftp/4.6.3a
<--- 200 Don't care
---> OPTS UTF8 ON
<--- 530 Please log in with USER and PASS first.
---> USER <omitted>
<--- 331 Password required for <omitted>
---> PASS <omitted>
<--- 230 Logged on
---> CLNT lftp/4.6.3a
<--- 200 Don't care
---> OPTS UTF8 ON
<--- 200 UTF8 mode enabled
---> PWD
<--- 257 "/" is current directory.
---- CWD path to be sent is `/Initial data/Practice area/Intellectual Property'
---> CWD Initial data
<--- 250 CWD successful. "/Initial data" is current directory.
---> CWD Practice area
<--- 250 CWD successful. "/Initial data/Practice area" is current directory.
---> CWD Intellectual Property
<--- 250 CWD successful. "/Initial data/Practice area/Intellectual Property" is current directory.
---> PASV
<--- 227 Entering Passive Mode (<omitted>)
---- Connecting data socket to (<omitted>) port <omitted>
---- Data connection established
---> LIST
<--- 150 Connection accepted
---- Got EOF on data connection
---- Closing data socket
<--- 226 Transfer OK
**** /Initial data/Practice area/Intellectual Property: No such file or directory
---> QUIT
<--- 221 Goodbye
---- Closing control socket
——正在解析主机地址。。。
----找到1个地址:
----正在连接到()端口
壮举

删除用于上载到服务器的--reverse选项。

删除用于上载到服务器的--reverse选项。

上载时,镜像的第一个参数应该是本地目录。根据顺序是mirror[OPTS][source[target]]。如果我切换这些参数,我的权限将被拒绝,这是有道理的,因为我没有写入权限将任何内容保存到FTP。然后不要使用--reverse,它用于上传到服务器。上传时,mirror的第一个参数应该是本地目录。根据顺序,顺序是mirror[OPTS][source target]]。如果我切换这些参数,我的权限会被拒绝,这是有道理的,因为我没有写入权限将任何内容保存到FTP。