操作系统:Redhat5.8
软件安装:
ftp-0.17-37.el5 客户端
vsftpd-2.0.5-24.el5 服务器端
lftp-3.7.11-7.el5 客户端
服务器端
启动服务:
#/etc/init.d/vsftpd start
默认服务一启动下载功能就可以使用
配置文件:/etc/vsftpd/vsftpd.conf
下载根目录: /var/ftp(权限最高只能是755)
创建子目录,把文件放到子目录或让客服端上传文件到子目录里面
开启上传:
#vim /etc/vsftpd/vsftpd.conf
--> 将27行和31行的注释打开
anon_upload_enable=YES
anon_mkdir_write_enable=YES
重启服务:
#/etc/init.d/vsftpd restart
客户端测试
ex:
#lftp 192.168.1.250
>get a.txt -o /root/Desktop --> 下载文件a.txt到本机/root/Desktop下
>put a.txt --> 上传文件
>mirror /dir /root/Desktop --> 下载目录dir到本机/root/Desktop目录下
>mirror -R /dir --> 上传目录
使用指定端口连接服务器:
ex:
#lftp 192.168.1.250:2121
or
#lftp 192.168.1.250 --port 2121
转载于:https://blog.51cto.com/marmotc/1319983