FTP Put步骤回顾

 

向一个环境内通过FTP推一个包,其中遇到不能在目标文件夹建立文件和文件夹的麻烦,关闭Passive mode就好了,记录一下。

[root@yw ~]# ftp x.x.x.x
Connected to x.x.x.x.
220 Serv-U FTP Server v6.2 for WinSock ready...
500 'AUTH': command not understood.
500 'AUTH': command not understood.
KERBEROS_V4 rejected as an authentication type
Name (172.16.1.96:root): xxd
331 User name okay, need password.
Password:
230 User logged in, proceed.
Remote system type is UNIX.
Using binary mode to transfer files.

 

ftp> hash
Hash mark printing on (1024 bytes/hash mark).

ftp> put /tmp/CentOS-5.2-i386-bin-DVD.iso
local: /tmp/CentOS-5.2-i386-bin-DVD.iso remote: /tmp/CentOS-5.2-i386-bin-DVD.iso
227 Entering Passive Mode (x.x.x.x,39,37) --主要就是这个模式不让建立文件
550 Permission denied.

ftp> passive
Passive mode off.--关闭

ftp> put /tmp/CentOS-5.2-i386-bin-DVD.iso
local: /tmp/CentOS-5.2-i386-bin-DVD.iso remote: /tmp/CentOS-5.2-i386-bin-DVD.iso
200 PORT Command successful.
550 CentOS-5.2-i386-bin-DVD.iso: Cannot create file. --要进入/tmp才能上传东西

ftp> lcd /tmp
Local directory now /tmp --进入/tmp

ftp> put CentOS-5.2-i386-bin-DVD.iso
local: CentOS-5.2-i386-bin-DVD.iso remote: CentOS-5.2-i386-bin-DVD.iso
200 PORT Command successful.
150 Opening BINARY mode data connection for CentOS-5.2-i386-bin-DVD.iso.
226 Transfer complete.
ftp> quit
421 Connection timed out - closing.

 

 

posted @   xxd  阅读(9997)  评论(0编辑  收藏  举报
编辑推荐:
· Linux系列:如何用 C#调用 C方法造成内存泄露
· AI与.NET技术实操系列(二):开始使用ML.NET
· 记一次.NET内存居高不下排查解决与启示
· 探究高空视频全景AR技术的实现原理
· 理解Rust引用及其生命周期标识(上)
阅读排行:
· 物流快递公司核心技术能力-地址解析分单基础技术分享
· .NET 10首个预览版发布:重大改进与新特性概览!
· 单线程的Redis速度为什么快?
· 展开说说关于C#中ORM框架的用法!
· Pantheons:用 TypeScript 打造主流大模型对话的一站式集成库
点击右上角即可分享
微信分享提示