扩展:

vsftp使用mysql存放虚拟用户并验证 http://www.aminglinux.com/bbs/thread-342-1-1.html

ftp的主动和被动模式  http://www.aminglinux.com/bbs/thread-961-1-1.html

 15.4 xshell使用xftp传输文件

下载XshellXftp插件:

快捷键:Ctrl + Alt + F

15.4 xshell使用xftp传输文件;15.5 使用pure-ftpd搭建ftp服务_xshell使用xftp传输文件

15.4 xshell使用xftp传输文件;15.5 使用pure-ftpd搭建ftp服务_xshell使用xftp传输文件_02

15.4 xshell使用xftp传输文件;15.5 使用pure-ftpd搭建ftp服务_xshell使用xftp传输文件_03

进邮箱里,点击链接,

15.4 xshell使用xftp传输文件;15.5 使用pure-ftpd搭建ftp服务_xshell使用xftp传输文件_04

就可以下载Xftp5.exe这个包!

15.4 xshell使用xftp传输文件;15.5 使用pure-ftpd搭建ftp服务_xshell使用xftp传输文件_05

15.4 xshell使用xftp传输文件;15.5 使用pure-ftpd搭建ftp服务_xshell使用xftp传输文件_06

Xshell登录状态,快捷键:Ctrl + Alt + F 弹出XFtp

默认状态:左边Windows系统桌面,右边centos系统用户夹目录

两个系统可以互传文件!!!

15.4 xshell使用xftp传输文件;15.5 使用pure-ftpd搭建ftp服务_xshell使用xftp传输文件_07

15.5 使用pure-ftpd搭建ftp服务

1. 安装epel-releasepure-ftpd

[root@hao-01 ~]# yum install -y epel-release

[root@hao-01 ~]# yum install -y pure-ftpd

2. 编辑pure-ftpd.conf配置文件:

[root@hao-01 ~]# vim /etc/pure-ftpd/pure-ftpd.conf

找到pureftpd.pdb这行,把行首#删除!

15.4 xshell使用xftp传输文件;15.5 使用pure-ftpd搭建ftp服务_xshell使用xftp传输文件_08

3. 关闭vsftpd服务(下面打开pure-ftpd服务 也需要占用21端口):

[root@hao-01 ~]# systemctl stop vsftpd

4. 搜索ftp进程是否启动?

[root@hao-01 ~]# ps aux |grep ftp

15.4 xshell使用xftp传输文件;15.5 使用pure-ftpd搭建ftp服务_xshell使用xftp传输文件_09

5. 查看pure-ftpd服务端口号

[root@hao-01 ~]# netstat -lntp

15.4 xshell使用xftp传输文件;15.5 使用pure-ftpd搭建ftp服务_xshell使用xftp传输文件_10

6. 创建一个测试目录ftp

[root@hao-01 ~]# mkdir /data/ftp

7. 创建一个普通用户,-u指定uid

[root@hao-01 ~]# useradd -u 1010 pure-ftp

8.测试目录ftp属主属组改为pure-ftp

[root@hao-01 ~]# chown -R pure-ftp:pure-ftp /data/ftp

9. 创建虚拟用户,指定映射的系统用户,指定虚拟用户夹目录

pure-pw useradd 虚拟用户名 -u 系统用户 -d 虚拟用户夹目录

[root@hao-01 ~]# pure-pw useradd ftp_usera -u pure-ftp -d /data/ftp

15.4 xshell使用xftp传输文件;15.5 使用pure-ftpd搭建ftp服务_xshell使用xftp传输文件_11

10. 执行命令:

[root@hao-01 ~]# pure-pw mkdb

11. 测试目录ftp下创建一个123.txt测试文件

[root@hao-01 ~]# touch /data/ftp/123.txt

12.ftp服务@本地ip,并ls查看

[root@hao-01 ~]# lftp ftp_usera@127.0.0.1

15.4 xshell使用xftp传输文件;15.5 使用pure-ftpd搭建ftp服务_xshell使用xftp传输文件_12

13. 更改123.txt测试文件属主属组

[root@hao-01 ~]# chown pure-ftp:pure-ftp /data/ftp/123.txt