当前位置: 技术问答>linux和unix
ftp文件上传不了
来源: 互联网 发布时间:2017-01-05
本文导语: 写了个文件上传的shell脚本,但文件上传不了 测试脚本如下: #!/usr/bin/ksh ftp -n -i -d 192.132.34.63 cd /ifframe/ftpdir mget ENUMANNULINFOCNFM?????????????????_???.txt bye ! 日志如下: Connected to 172.168.56.58. 220-Welcome to Pure-FTPd. 220-Y...
写了个文件上传的shell脚本,但文件上传不了
测试脚本如下:
#!/usr/bin/ksh
ftp -n -i -d 192.132.34.63 cd /ifframe/ftpdir
mget ENUMANNULINFOCNFM?????????????????_???.txt
bye
!
日志如下:
Connected to 172.168.56.58.
220-Welcome to Pure-FTPd.
220-You are user number 1 of 10 allowed.
220-
220-This is a private system - No anonymous login
220 You will be disconnected after 15 minutes of inactivity.
---> USER mdmc
331 User mdmc OK. Password required
---> PASS XXXX
230-User mdmc has group access to: dba oinstall wheel
230 OK. Current directory is /home/mdmc
---> SYST
215 UNIX Type: L8
Remote system type is UNIX.
Using binary mode to transfer files.
---> FEAT
211-Extensions supported:
EPRT
IDLE
MDTM
SIZE
REST STREAM
MLST type*;size*;sizd*;modify*;UNIX.mode*;UNIX.uid*;UNIX.gid*;unique*;
MLSD
TVFS
ESTP
PASV
EPSV
SPSV
ESTA
AUTH TLS
PBSZ
PROT
211 End.
features[0] = 1
features[1] = 1
features[2] = 1
features[3] = 1
features[4] = 1
features[5] = 1
---> CWD ~/webapps/portal/iagwm/synEnumFile/synEnumAnnul/synEnumAnnulInfoFile
250 OK. Current directory is /home/mdmc/webapps/portal/iagwm/synEnumFile/synEnumAnnul/synEnumAnnulInfoFile
---> PWD
257 "/home/mdmc/webapps/portal/iagwm/synEnumFile/synEnumAnnul/synEnumAnnulInfoFile" is your current location
got remotepwd as `/home/mdmc/webapps/portal/iagwm/synEnumFile/synEnumAnnul/synEnumAnnulInfoFile'
ftp: setsockopt (ignored): Permission denied---> EPSV
---> NLST ENUMANNULINFOCNFM?????????????????_???.txt
---> QUIT
221-Goodbye. You uploaded 0 and downloaded 0 kbytes.
221 Logout.
在线等...........
测试脚本如下:
#!/usr/bin/ksh
ftp -n -i -d 192.132.34.63 cd /ifframe/ftpdir
mget ENUMANNULINFOCNFM?????????????????_???.txt
bye
!
日志如下:
Connected to 172.168.56.58.
220-Welcome to Pure-FTPd.
220-You are user number 1 of 10 allowed.
220-
220-This is a private system - No anonymous login
220 You will be disconnected after 15 minutes of inactivity.
---> USER mdmc
331 User mdmc OK. Password required
---> PASS XXXX
230-User mdmc has group access to: dba oinstall wheel
230 OK. Current directory is /home/mdmc
---> SYST
215 UNIX Type: L8
Remote system type is UNIX.
Using binary mode to transfer files.
---> FEAT
211-Extensions supported:
EPRT
IDLE
MDTM
SIZE
REST STREAM
MLST type*;size*;sizd*;modify*;UNIX.mode*;UNIX.uid*;UNIX.gid*;unique*;
MLSD
TVFS
ESTP
PASV
EPSV
SPSV
ESTA
AUTH TLS
PBSZ
PROT
211 End.
features[0] = 1
features[1] = 1
features[2] = 1
features[3] = 1
features[4] = 1
features[5] = 1
---> CWD ~/webapps/portal/iagwm/synEnumFile/synEnumAnnul/synEnumAnnulInfoFile
250 OK. Current directory is /home/mdmc/webapps/portal/iagwm/synEnumFile/synEnumAnnul/synEnumAnnulInfoFile
---> PWD
257 "/home/mdmc/webapps/portal/iagwm/synEnumFile/synEnumAnnul/synEnumAnnulInfoFile" is your current location
got remotepwd as `/home/mdmc/webapps/portal/iagwm/synEnumFile/synEnumAnnul/synEnumAnnulInfoFile'
ftp: setsockopt (ignored): Permission denied---> EPSV
---> NLST ENUMANNULINFOCNFM?????????????????_???.txt
---> QUIT
221-Goodbye. You uploaded 0 and downloaded 0 kbytes.
221 Logout.
在线等...........
|
加一个被动模式试试
ftp -n -i -d 192.132.34.63 cd /ifframe/ftpdir
passive
mget ENUMANNULINFOCNFM?????????????????_???.txt
bye
!
ftp -n -i -d 192.132.34.63 cd /ifframe/ftpdir
passive
mget ENUMANNULINFOCNFM?????????????????_???.txt
bye
!
|
服务-防火墙-权限-系统
慢慢找问题
慢慢找问题
|
那就把prompt 去掉
|
mget test12.txt [anpqy?]? ftp: local: test12.txt: Permission denied:本地文件的权限
理论上来讲:批量下载mget,需要通过prompt关掉交互。
理论上来讲:批量下载mget,需要通过prompt关掉交互。