(一)vsftpd
安装
# yum -y install vsftpd
Installed:
vsftpd.i686 0:2.2.2-12.el6_5.1
设置
# cp /etc/vsftpd/vsftpd.conf /etc/vsftpd/vsftpd.conf.backup
# vi /etc/vsftpd/vsftpd.conf
# 不允许匿名用户登录
anonymous_enable=NO
# 设置空闲时间
idle_session_timeout=300
# 设置链接超时时间
data_connection_timeout=30
# 允许上传下载
ascii_upload_enable=YES
ascii_download_enable=YES
# 登陆后的欢迎词
ftpd_banner=Welcome to Myvsftpd FTP service.
# 不允许一般用户访问上层文件夹
chroot_local_user=YES
chroot_list_enable=YES
# 可以访问上层文件夹的用户一览
chroot_list_file=/etc/vsftpd/chroot_list
# 允许删除文件夹
ls_recurse_enable=YES
# 只允许「/etc/vsftpd/user_list」内的用户访问
userlist_enable=NO
用户设置
# vi /etc/vsftpd/chroot_list
root
# /usr/sbin/useradd ftpuser1 -d /home/ftpuser1 -G nobody
# passwd ftpuser1
New password: 123456
Retype new password: 123456
passwd: all authentication tokens updated successfully.
# vi /etc/vsftpd/user_list
ftpuser1
# vi /etc/hosts.allow
vsftpd : 192.168.21. 127.0.0.1
# vi /etc/hosts.deny
vsftpd : ALL
启动服务
# /etc/rc.d/init.d/vsftpd start
(二)ProFTPD
下载安装
# cd /usr/local/src
# wget ftp://ftp.proftpd.org/distrib/source/proftpd-1.3.5.tar.gz
# tar xvfz proftpd-1.3.5.tar.gz
# cd proftpd-1.3.5
# ./configure --enable-nls --prefix=/usr/local/proftpd
# make
# make install
创建用户
# cd /usr/local/proftpd/bin
# /usr/sbin/useradd ftpuser1 -d /home/ftpuser1 -G nobody
# passwd ftpuser1
New password: 123456
Retype new password: 123456
passwd: all authentication tokens updated successfully.
做成私有密码文件
# id ftpuser1
# ./ftpasswd --passwd --file=/usr/local/proftpd/etc/ftpd.passwd --name=ftpuser1 \
--uid=502 --gid=502 --home=/home/ftpuser1 --shell=/bin/bash
ftpasswd: using alternate file: /usr/local/proftpd/etc/ftpd.passwd
ftpasswd: creating passwd entry for user ftpuser1
Password:111111
Re-type password:111111
ftpasswd: entry created
# ./ftpasswd --group --file=/usr/local/proftpd/etc/ftpd.group \
--name=ftpuser1 --gid=502
ftpasswd: using alternate file: /usr/local/proftpd/etc/ftpd.group
ftpasswd: creating group entry for group ftpuser1
ftpasswd: entry created
设置
# cp /usr/local/proftpd/etc/proftpd.conf /usr/local/proftpd/etc/proftpd.conf.bak
vi /usr/local/proftpd/etc/proftpd.conf
ServerName "Welcome to MyProFTPD FTP service."
Group nobody
DefaultRoot ~
注释掉「<Anonymous ~ftp>」 到 「</Anonymous>」
ExtendedLog /var/log/proftp.log all
<Directory />
HideFiles ^\..*
</Directory>
AuthUserFile /usr/local/proftpd/etc/ftpd.passwd
AuthGroupFile /usr/local/proftpd/etc/ftpd.group
AuthOrder mod_auth_file.c
MaxClientsPerHost 2
MaxClients 20
PathAllowFilter \.(jpg|gif|png|jpeg)$
MaxStoreFileSize 3 Mb
ListOptions -a maxfiles 1000
启动脚本
# cd /usr/local/src/proftpd-1.3.5/contrib/dist/rpm
# cp proftpd.init.d /etc/init.d/proftpd
# vi /etc/init.d/proftpd
# chmod +x /etc/init.d/proftpd
启动服务
# /etc/init.d/proftpd start
FTP确认测试
C:\Documents and Settings\RenSanNing>ftp
连接
ftp> op
To 192.168.21.xxx
Connected to 192.168.21.xxx.
220 Welcome to MyProFTPD FTP service.
User (192.168.21.xxx:(none)): ftpuser1
331 Please specify the password.
Password:
230 Login successful.
变更文件夹
ftp> pwd
257 "/"
ftp> cd /root/
550 Failed to change directory.
ftp> cd /etc/
550 Failed to change directory.
上传文件
ftp> put c:\test.txt
200 PORT command successful. Consider using PASV.
150 Ok to send data.
226 Transfer complete.
ftp: 7 bytes sent in 0.00Seconds 7000.00Kbytes/sec.
确认文件
ftp> ls -l
200 PORT command successful. Consider using PASV.
150 Here comes the directory listing.
-rw-r--r-- 1 503 503 7 Aug 20 11:51 test.txt
226 Directory send OK.
ftp: 66 bytes received in 0.00Seconds 66000.00Kbytes/sec.
下载文件
ftp> get test.txt
200 PORT command successful. Consider using PASV.
150 Opening ASCII mode data connection for test.txt (7 bytes).
226 Transfer complete.
ftp: 7 bytes received in 0.00Seconds 7000.00Kbytes/sec.
ftp> bye
221 Goodbye.
客户端工具:
FFFTP:
http://sourceforge.jp/projects/ffftp/
FileZilla:
https://filezilla-project.org/
分享到:
相关推荐
CentOS6-Base-163.repo更新源,直接放到/etc/yum.repos.d目录下,只想yum update即可将源换成163的源。
CentOS-7.2-x86_64-DVD-1511 CentOS-7.3-x86_64-DVD-1611 CentOS-7.4-x86_64-DVD-1708 CentOS-7.5-x86_64-DVD-1804 CentOS-7.6-aarch64-Everything-1810 CentOS-7.6-x86_64-DVD-1810 CentOS-7.7-x86_64-DVD-1908 ...
pgdg-centos96-9.6-3.noarch postgresql的依赖包postgresql的依赖包
centos7下centos-release-openstack-pike
# CentOS-7-x86_64-DVD-1810.iso CentOS 7.6 DVD 版 4G http://mirrors.163.com/centos/7.6.1810/isos/x86_64/CentOS-7-x86_64-DVD-1810.iso # CentOS-7-x86_64-Everything-1810.iso CentOS 7.6 Everything版 10G ...
centos7.6.1810---镜像包dockercentos7.6.1810---镜像包dockercentos7.6.1810---镜像包docker
内容: 1、centos 6 安装 mantisbt-1.2.8 ; 2、 centos 7 安装 mantisbt-2.12.0.zip 3、mantisbt-2.12.0.tar.gz包; 4、MySQL-5.5.59-1.el7.x86_64.rpm-bundle.tar包
CentOS6-Mysql-5.7.28-离线安装包(含依赖安装包)CentOS6-Mysql-5.7.28-离线安装包(含依赖安装包)CentOS6-Mysql-5.7.28-离线安装包(含依赖安装包)
CentOS-6.6-x86_64-bin-DVD1.iso和CentOS-6.6-x86_64-bin-DVD2镜像文件百度云下载
Txt文件中包含 CentOS-6.3-i386-bin-DVD1.iso 和 CentOS-6.3-i386-bin-DVD2.iso 的官网下载地址 和百度网盘下载地址
centos 5.5+Vsftpd-2.3.4安装详细过程
CentOS 7.9版本(CentOS-7-i386-Everything-2009)适用于i386,必须集齐9个文件才能一起解压缩使用,9个文件下载地址: CentOS-7-i386-Everything-2009.part09.rar ... CentOS-7-i386-Everything-2009.part08.rar ...
Centos7下安装vsftpd并启用虚拟用户访问
centos 6上的vsftpd v3.0.5版本rpm安装包 1)如果运行了vsftpd,则先停止: service vsftpd stop 2)安装或升级vsftpd: rpm -Uvh vsftpd-3.0.5-1.el6.x86_64.rpm 3)然后修改vsftpd.conf文件: sed -i 's|...
CentOS7-Base-163.repo,替换国内yum源。(地方撒发生的发顺丰达是打发斯蒂芬放松放松防守打法电风扇放松放)括号中的字是凑字数
CentOS是免费的、开源的、可以重新分发的开源操作系统,CentOS(Community Enterprise Operating System,中文意思是社区企业操作系统)是Linux发行版之一。...CentOS-7-aarch64-Minimal-2009适用于ARM64 (aarch64)
Centos-6-Vault-Aliyun.repo
离线安装包,亲测可用