我有一个 bash 脚本,我试图在我的 hostgator 帐户上运行。
cd $HOMEDIR
dir="$(date +'%a')"
# Upload backups (5 tries)
i=0
while [ $i -le 5 ]; do
# We're running this more than once so it's advised to use -E to delete the
# original file after successful transfer.
lftp -d -e "set ftp:ssl-allow no; mrm backup-*.tar.gz; mput -c -E -O $dir backup-*.tar.gz;quit" -u $FTP_USER,$FTP_PASS -p $FTP_PORT $FTP_ADDR
sleep 5
((i++))
done
# Delete backup before generating new b/c hostgator allows only one
rm backup-*.tar.gz
# Generate new full backup in Cpanel
PARAMS="dest=homedir&email=$EMAIL&submit=Generate%20Backup"
curl -u $CPANEL_USER:$CPANEL_PASS --data $PARAMS $CPANEL_HOST/frontend/x3/backup/dofullbackup.html
上面的脚本从客户端(hostgator)给我留下了以下错误代码:
---> FEAT
<--- 211-Features:
<--- MDTM
<--- REST STREAM
<--- SIZE
<--- MLST type*;size*;modify*;
<--- MLSD
<--- AUTH SSL
<--- AUTH TLS
<--- PROT
<--- PBSZ
<--- UTF8
<--- CLNT
<--- MFMT
<--- EPSV
<--- EPRT
<--- 211 End
---> CLNT lftp/4.0.9
<--- 200 Don't care
---> OPTS UTF8 ON
<--- 202 UTF8 mode is always enabled. No need to send this command.
---> USER emre**
<--- 331 Password required for emre**
---> PASS *******
<--- 230 Logged on
---> PWD
<--- 257 "/" is current directory.
---> TYPE I
<--- 200 Type set to I
---> SIZE Fri/backup-6.17.2016_08-40-54_emre.tar.gz
<--- 550 File not found
---> PASV
<--- 227 Entering Passive Mode (**,***,**,**,199,56)
---- Connecting data socket to (**.***.**.**) port 51000
**** Socket error (Connection refused) - reconnecting
---- Closing data socket
---- Closing control socket
服务器系统是在 windows 10 上运行的 firezilla。
(000017)6/17/2016 19:01:11 PM - (not logged in) (***.***.***.**)> Connected on port 2222, sending welcome message...
(000017)6/17/2016 19:01:11 PM - (not logged in) (***.***.***.**)> 220-FileZilla Server 0.9.57 beta
(000017)6/17/2016 19:01:11 PM - (not logged in) (***.***.***.**)> 220-written by Tim Kosse (tim.kosse@filezilla-project.org)
(000017)6/17/2016 19:01:11 PM - (not logged in) (***.***.***.**)> 220 Please visit https://filezilla-project.org/
(000017)6/17/2016 19:01:11 PM - (not logged in) (***.***.***.**)> FEAT
(000017)6/17/2016 19:01:11 PM - (not logged in) (***.***.***.**)> 211-Features:
(000017)6/17/2016 19:01:11 PM - (not logged in) (***.***.***.**)> MDTM
(000017)6/17/2016 19:01:11 PM - (not logged in) (***.***.***.**)> REST STREAM
(000017)6/17/2016 19:01:11 PM - (not logged in) (***.***.***.**)> SIZE
(000017)6/17/2016 19:01:11 PM - (not logged in) (***.***.***.**)> MLST type*;size*;modify*;
(000017)6/17/2016 19:01:11 PM - (not logged in) (***.***.***.**)> MLSD
(000017)6/17/2016 19:01:11 PM - (not logged in) (***.***.***.**)> AUTH SSL
(000017)6/17/2016 19:01:11 PM - (not logged in) (***.***.***.**)> AUTH TLS
(000017)6/17/2016 19:01:11 PM - (not logged in) (***.***.***.**)> PROT
(000017)6/17/2016 19:01:11 PM - (not logged in) (***.***.***.**)> PBSZ
(000017)6/17/2016 19:01:11 PM - (not logged in) (***.***.***.**)> UTF8
(000017)6/17/2016 19:01:11 PM - (not logged in) (***.***.***.**)> CLNT
(000017)6/17/2016 19:01:11 PM - (not logged in) (***.***.***.**)> MFMT
(000017)6/17/2016 19:01:11 PM - (not logged in) (***.***.***.**)> EPSV
(000017)6/17/2016 19:01:11 PM - (not logged in) (***.***.***.**)> EPRT
(000017)6/17/2016 19:01:11 PM - (not logged in) (***.***.***.**)> 211 End
(000017)6/17/2016 19:01:11 PM - (not logged in) (***.***.***.**)> CLNT lftp/4.0.9
(000017)6/17/2016 19:01:11 PM - (not logged in) (***.***.***.**)> 200 Don't care
(000017)6/17/2016 19:01:11 PM - (not logged in) (***.***.***.**)> OPTS UTF8 ON
(000017)6/17/2016 19:01:11 PM - (not logged in) (***.***.***.**)> 202 UTF8 mode is always enabled. No need to send this command.
(000017)6/17/2016 19:01:11 PM - (not logged in) (***.***.***.**)> USER emre**
(000017)6/17/2016 19:01:11 PM - (not logged in) (***.***.***.**)> 331 Password required for emre**
(000017)6/17/2016 19:01:11 PM - (not logged in) (***.***.***.**)> PASS ********
(000017)6/17/2016 19:01:11 PM - emre** (***.***.***.**)> 230 Logged on
(000017)6/17/2016 19:01:11 PM - emre** (***.***.***.**)> PWD
(000017)6/17/2016 19:01:11 PM - emre** (***.***.***.**)> 257 "/" is current directory.
(000017)6/17/2016 19:01:11 PM - emre** (***.***.***.**)> PASV
(000017)6/17/2016 19:01:11 PM - emre** (***.***.***.**)> 227 Entering Passive Mode (76,100,88,71,199,56)
(000017)6/17/2016 19:01:11 PM - emre** (***.***.***.**)> LIST
(000017)6/17/2016 19:01:11 PM - emre** (***.***.***.**)> ABOR
(000017)6/17/2016 19:01:11 PM - emre** (***.***.***.**)> 226 ABOR command successful
(000017)6/17/2016 19:01:11 PM - emre** (***.***.***.**)> disconnected.
我不知道这是怎么回事?任何人都可以发出一些光吗?我已经挖掘了几个小时,无法弄清楚。