欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页  >  科技

【Linux服务】vsftpd文件传输协议

程序员文章站 2023-01-16 11:55:01
vsftpd文件传输协议 系统环境:CentOS Linux release 7.6.1810 (Core) 一、简介 FTP(文件传输协议)全称是:Very Secure FTP Server。 Vsftpd是linux类操作系统上运行的ftp服务器软件。 vsftp提供三种登陆方式:1.匿名登录 ......

vsftpd文件传输协议

系统环境:centos linux release 7.6.1810 (core) 

一、简介

ftp(文件传输协议)全称是:very secure ftp server。   vsftpd是linux类操作系统上运行的ftp服务器软件。 

vsftp提供三种登陆方式:1.匿名登录  2.本地用户登录  3.虚拟用户登录

vsftpd的特点:

  1)较高的安全性需求   

  2)带宽的限制   

  3)创建支持虚拟用户   

  4)支持ipv6   

  5)中等偏上的性能   

  6)可分配虚拟ip   

  7)高速

 ftp会话时采用了两种通道:

   1)控制通道:与ftp服务器进行沟通的通道,链接ftp发送ftp指令都是通过控制通道来完成的。

   2)数据通道:数据通道和ftp服务器进行文件传输或则列表的通道 

二、工作原理

ftp协议中控制连接均是由客户端发起,而数据连接有两种工作方式:port和pasv方式

【Linux服务】vsftpd文件传输协议

 port模式(主动模式)--> 默认

  ftp客户端首先和ftp server的tcp 21端口建立连接,通过这个通道发送命令,客户端要接受数据的时候在这个通道上发送port命令,port命令包含了客户端用什么端口(一个大于1024的端口)接受数据,在传送数据的时候,服务器端通过自己的tcp 20端口发送数据。这个时候数据连接由server向client建立一个连接。

 port交互流程:

client端:client链接server的21端口,并发送用户名密码和一个随机在1024上的端口及port命令给server,表明采用主动模式,并开放那个随机的端口。

server端:server收到client发来的port主动模式命令与端口后,会通过自己的20端口与client那个随机的端口连接后,进行数据传输。

【Linux服务】vsftpd文件传输协议

  pasv模式(被动方式)

  建立控制通道和port模式类似,当客户端通过这个通道发送pasv命令的时候,ftp server打开了一个位于1024和5000之间的随机端口并且通知客户端在这个端口上进行传输数据请求,然后ftp server将通过这个端口进行数据传输。这个时候数据连接由client向server建立连接。

  pasv交互流程

clietn:client连接server的21号端口,发送用户名密码及pasv命令给server,表明采用被动模式。

server:server收到client发来的pasv被动模式命令之后,把随机开放在1024上的端口告诉client,client再用自己的20 端口与server的那个随机端口进行连接后进行数据传输。

【Linux服务】vsftpd文件传输协议

  如果从c/s模型这个角度来说,port对于服务器来说是outbound,而pasv模式对于服务器是inbound,这一点请特别注意,尤其是在使用防火墙的企业里,这一点非常关键,如果设置错了,那么客户将无法连接。

三、安装vsfpd

1.安装vsftpd相关组件

[root@vm_0_10_centos shellscript]# yum -y install vsftpd*

2.安装pam服务相关组件

[root@vm_0_10_centos shellscript]# yum -y install pam*

安装pam报错:

--> finished dependency resolution
error: package: 2:postfix-2.10.1-7.el7.x86_64 (@anaconda)
           requires: libmysqlclient.so.18(libmysqlclient_18)(64bit)
error: package: libmapi-7.1.14-3.el7.x86_64 (epel)
           requires: libmysqlclient.so.18(libmysqlclient_18)(64bit)
error: package: libmapi-7.1.14-3.el7.x86_64 (epel)
           requires: libmysqlclient.so.18()(64bit)
error: package: 2:postfix-2.10.1-7.el7.x86_64 (@anaconda)
           requires: libmysqlclient.so.18()(64bit)
 you could try using --skip-broken to work around the problem
** found 2 pre-existing rpmdb problem(s), 'yum check' output follows:
2:postfix-2.10.1-7.el7.x86_64 has missing requires of libmysqlclient.so.18()(64bit)
2:postfix-2.10.1-7.el7.x86_64 has missing requires of libmysqlclient.so.18(libmysqlclient_18)(64bit)

解决:

缺少percona-xtradb-cluster-shared-55-5.5.37-25.10.756.el6.x86_64.rpm这个包

[root@vm_0_10_centos tmp]# wget http://www.percona.com/redir/downloads/percona-xtradb-cluster/5.5.37-25.10/rpm/rhel6/x86_64
/percona-xtradb-cluster-shared-55-5.5.37-25.10.756.el6.x86_64.rpm
[root@vm_0_10_centos tmp]# rpm -ivh percona-xtradb-cluster-shared-55-5.5.37-25.10.756.el6.x86_64.rpm 
warning: percona-xtradb-cluster-shared-55-5.5.37-25.10.756.el6.x86_64.rpm: header v4 dsa/sha1 signature, key id cd2efd2a: n
okeypreparing...                          ################################# [100%]
updating / installing...
   1:percona-xtradb-cluster-shared-55-################################# [100%]

参考网址:

最后再运行安装pam即可

# yum -y install pam*

3.安装db4部件包

用来支持文件数据库

[root@vm_0_10_centos tmp]# yum -y install db4*

四、系统账户

1.建立vsftpd服务的宿主用户

默认的vsftpd的服务宿主用户是root,但不符合安全性的需要。这里建立名字为vsftpd的用户,用他来作为支持vsftpd的服务宿主用户。由于该用户仅用来支持vsftpd服务用,因此没有许可他登陆系统的必要,并设定他为不能登陆系统的用户。

nologin参考网址:

[root@vm_0_10_centos tmp]# useradd vsftpd -s /sbin/nologin

/sbin/nologin更改用户是否可以使用ssh登录

2.建立vsftpd虚拟宿主用户

[root@vm_0_10_centos tmp]# useradd vrvsftpd -s /sbin/nologin

虚拟用户并不是系统用户,也就是说这些ftp的用户在系统中是不存在的。他们的总体权限其实是集中寄托在一个在系统中的某一个用户身上的,所谓vsftpd的虚拟宿主用户,就是这样一个支持着所有虚拟用户的宿主用户。由于他支撑了ftp的所有虚拟的用户,那么他本身的权限将会影响着这些虚拟的用户,因此,处于安全性的考虑,也要非分注意对该用户的权限的控制,该用户也绝对没有登陆系统的必要,这里也设定他为不能登陆系统的用户。

五、修改vsftpd配置文件

1.编辑配置文件前先备份

[root@vm_0_10_centos tmp]# cp /etc/vsftpd/vsftpd.conf /etc/vsftpd/vsftpd.conf.backup

内容如下:

[root@vm_0_10_centos tmp]# cat /etc/vsftpd/vsftpd.conf

# allow anonymous ftp? (beware - allowed by default if you comment this out).
# anonymous_enable=yes
# 设置不允许匿名访问
anonymous_enable=no

#
# uncomment this to allow local users to log in.
# when selinux is enforcing check for se bool ftp_home_dir
# 设置本地用户可以访问。ps:主要为虚拟宿主用户,如该项目设定为no,那么所有虚拟用户将无法访问
 local_enable=yes

#
# uncomment this to enable any form of ftp write command.
# 设置可进行写操作
write_enable=yes

#
# default umask for local users is 077. you may wish to change this to 022,
# if your users expect that (022 is used by most other ftpd's)
# 设置上传后文件的权限掩码
local_umask=022

#
# uncomment this to allow the anonymous ftp user to upload files. this only
# has an effect if the above global write enable is activated. also, you will
# obviously need to create a directory writable by the ftp user.
# when selinux is enforcing check for se bool allow_ftpd_anon_write, allow_ftpd_full_access
#anon_upload_enable=yes
# 禁止匿名用户上传文件
anonymous_enable=no

#
# uncomment this if you want the anonymous ftp user to be able to create
# new directories.
#anon_mkdir_write_enable=yes
# 禁止匿名用户建立目录
anon_mkdir_write_enable=no

#
# activate directory messages - messages given to remote users when they
# go into a certain directory.
# 设置开启目录标语功能
dirmessage_enable=yes

#
# activate logging of uploads/downloads.
# 开启日志记录功能
xferlog_enable=yes

#
# make sure port transfer connections originate from port 20 (ftp-data).
# 设置端口20进行数据库连接
connect_from_port_20=yes

#
# if you want, you can arrange for uploaded anonymous files to be owned by
# a different user. note! using "root" for uploaded files is not
# recommended!
#chown_uploads=yes
#chown_username=whoever
# 设置禁止上传文件更改宿主
chown_uploads=no

#
# you may override where the log file goes if you like. the default is shown
# below.
#xferlog_file=/var/log/xferlog
# 设置vsftpd服务日志保存路径。ps:该文件默认不存在,须手动创建。
# 由于这里手动更改了vsftpd宿主用户为vsftpd,须注意给与改用户对日志的写入权限
xferlog_file=/var/log/vsftpd.log

#
# if you want, you can have your log file in standard ftpd xferlog format.
# note that the default log file location is /var/log/xferlog in this case.
# 设置日志使用标准的记录格式
xferlog_std_format=yes

#
# you may change the default value for timing out an idle session.
# 设置空闲连接超时时间,这里使用默认。
# 将具体数值留给每个具体用户具体指定,当然如果不指定的话,还是使用这里的默认值600,单位秒
#idle_session_timeout=600

#
# you may change the default value for timing out a data connection.
# 设定单次最大连续传输时间,这里使用默认。
# 将具体数值留给每个具体用户具体指定,当然如果不指定的话,还是使用这里的默认值120,单位秒。
#data_connection_timeout=120

#
# it is recommended that you define on your system a unique user which the
# ftp server can use as a totally isolated and unprivileged user.
#nopriv_user=ftpsecure
# 设定支撑vsftpd服务的宿主用户为手动建立的vsftpd用户。
# ps:一旦做出更改宿主用户后,必须注意一起与该服务相关的读写文件的读写赋权问题。比如日志文件就必须给与该用户写入权限等。
nopriv_user=vsftpd

#
# enable this and the server will recognise asynchronous abor requests. not
# recommended for security (the code is non-trivial). not enabling it,
# however, may confuse older ftp clients.
# 设置支持异步传输功能
async_abor_enable=yes

#
# ascii mangling is a horrible feature of the protocol.
# 设置支持ascii模式上传和下载功能
ascii_upload_enable=yes
ascii_download_enable=yes

#
# you may fully customise the login banner string:
#ftpd_banner=welcome to blah ftp service.
# 设置vsftpd的登录标语
ftpd_banner=this vsftp server supports virtual users ^_^

#
# you may specify a file of disallowed anonymous e-mail addresses. apparently
# useful for combatting certain dos attacks.
#deny_email_enable=yes
# (default follows)
#banned_email_file=/etc/vsftpd/banned_emails
#
# you may specify an explicit list of local users to chroot() to their home
# directory. if chroot_local_user is yes, then this list becomes a list of
# users to not chroot().
# (warning! chroot'ing can be very dangerous. if using chroot, make sure that
# the user does not have write access to the top level directory within the
# chroot)
#chroot_local_user=yes
#chroot_list_enable=yes
# 禁止用户登出自己的ftp主目录
chroot_list_enable=no

# (default follows)
#chroot_list_file=/etc/vsftpd/chroot_list
#
# you may activate the "-r" option to the builtin ls. this is disabled by
# default to avoid remote users being able to cause excessive i/o on large
# sites. however, some broken ftp clients such as "ncftp" and "mirror" assume
# the presence of the "-r" option, so there is a strong case for enabling it.
#ls_recurse_enable=yes
# 禁止用户登录ftp后使用"ls -r"命令。该命令会对服务器性能造成巨大开销。如果该项被允许,那么挡多用户同时使用该命令时将会对该服务器造成威胁。
ls_recurse_enable=no

#
# when "listen" directive is enabled, vsftpd runs in standalone mode and
# listens on ipv4 sockets. this directive cannot be used in conjunction
# with the listen_ipv6 directive.
# listen=no
# 设定该vsftpd服务工作在standalone模式下。
# 顺便展开说明一下,所谓standalone模式就是该服务拥有自己的守护进程支持,
# 在ps -a命令下我们将可用看到vsftpd的守护进程名。如果不想工作在standalone模式下,则可以选择superdaemon模式,
# 在该模式下 vsftpd将没有自己的守护进程,而是由超级守护进程xinetd全权代理,与此同时,vsftp服务的许多功能将得不到实现
listen=yes

#
# this directive enables listening on ipv6 sockets. by default, listening
# on the ipv6 "any" address (::) will accept connections from both ipv6
# and ipv4 clients. it is not necessary to listen on *both* ipv4 and ipv6
# sockets. if you want that (perhaps because you want to listen on specific
# addresses) then you must run two copies of vsftpd with two configuration
# files.
# make sure, that one of the listen options is commented !!

 # listen_ipv6=yes
 # 设置pam服务下vsftpd的验证配置文件名。因此,pam验证将参考/etc/pam.d/下的vsftpd文件配置
  pam_service_name=vsftpd
 # 设定userlist_file中的用户将不得使用ftp。
  userlist_enable=yes
 # 设定支持tcp wrappers。
  tcp_wrappers=yes

# 以下这些是关于vsftpd虚拟用户支持的重要配置项目。默认vsftpd.conf中不包含这些设定项目,需要自己手动添加配置。
# 设置启用虚拟用户功能
guest_enable=yes

# 指定虚拟用户宿主用户
guest_username=vrvsftpd

# 设定虚拟用户的权限符合他们的宿主用户。
virtual_use_local_privs=yes

# 设定虚拟用户个人vsftp的配置文件存放路径。
# 也就是说,这个被指定的目录里,将存放每个vsftp虚拟用户个性的配置文件,一个需要注意的地方就是这些配置文件名必须和虚拟用户名相同。
user_config_dir=/etc/vsftpd/vconf

 3.建立vsftpd的日志文件,并更该属主为vsftpd的服务宿主用户

[root@vm_0_10_centos tmp]# touch /var/log/vsftpd.log
[root@vm_0_10_centos tmp]# chown vsftpd.vsftpd /var/log/vsftpd.log

4.建立虚拟用户配置文件存放路径

[root@vm_0_10_centos tmp]# mkdir /etc/vsftpd/vconf

六、制作虚拟用户数据库文件

 1.先建立虚拟用户名单文件

建立了一个虚拟用户名单文件,这个文件就是来记录vsftpd虚拟用户的用户名和口令的数据文件,我这里给它命名为virtusers。为了避免文件的混乱,我把这个名单文件就放置在/etc/vsftpd/下。

[root@vm_0_10_centos tmp]# touch /etc/vsftpd/virtusers

2.编辑虚拟用户名单文件

格式为:“一行用户名,一行口令”。

[root@vm_0_10_centos tmp]# cat /etc/vsftpd/virtusers 
zs
设置的密码
thy 设置的密码

3.生成虚拟用户数据文件

db_load主要用来生成db数据库使用。在vsftpd的虚拟用户设置中先新建一个文件users.txt 把用户名密码放入其中

接着 db_load -t -t hash -f   */users.txt    */users.db

ps: * 表示目录

这样就生成了一个users.db文件(hash码型的数据库文件)

 参考网址:

[root@vm_0_10_centos tmp]# db_load -t -t hash -f /etc/vsftpd/virtusers /etc/vsftpd/virtusers.db

参数:

  选项-t允许应用程序能够将文本文件转译载入进数据库。由于我们之后是将虚拟用户的信息以文件方式存储在文件里的,为了让vsftpd这个应用程序能够通过文本来载入用户数据,必须要使用这个选项。  

  子选项-t,追加在在-t选项后,用来指定转译载入的数据库类型。扩展介绍下,-t可以指定的数据类型有btree、hash、queue和recon数据库

 ps:如果指定了选项-t,那么一定要追跟子选项 -t

4.察看生成的虚拟用户数据文件

[root@vm_0_10_centos tmp]# ll /etc/vsftpd/virtusers.db 
-rw-r--r-- 1 root root 12288 oct  9 11:02 /etc/vsftpd/virtusers.db

ps:以后再添加虚拟用户的时候,只需要按照“一行用户名,一行口令”的格式将新用户名和口令添加进虚拟用户名单文件。但是光这样做还不够,不会生效的哦!还要再执行一遍“ db_load -t -t hash -f 虚拟用户名单文件 虚拟用户数据库文件.db ”的命令使其生效才可以!

七、设定pam验证文件,并指定虚拟用户数据库文件进行读取

1.察看原来的vsftp的pam验证配置文件

[root@vm_0_10_centos tmp]# cat /etc/pam.d/vsftpd 
#%pam-1.0
session    optional     pam_keyinit.so    force revoke
auth       required    pam_listfile.so item=user sense=deny file=/etc/vsftpd/ftpusers onerr=succeed
auth       required    pam_shells.so
auth       include    password-auth
account    include    password-auth
session    required     pam_loginuid.so
session    include    password-auth

2.在编辑前做好备份

[root@vm_0_10_centos tmp]# cp /etc/pam.d/vsftpd /etc/pam.d/vsftpd.backup
[root@vm_0_10_centos tmp]# vi /etc/pam.d/vsftpd

内容如下

[root@vm_0_10_centos tmp]# vi /etc/pam.d/vsftpd
#%pam-1.0
session    optional     pam_keyinit.so    force revoke
# 以下两条是手动添加的,内容是对虚拟用户的安全和帐户权限进行验证。
# 这里的auth是指对用户的用户名口令进行验证
auth    sufficient      /usr/lib64/security/pam_userdb.so     db=/etc/vsftpd/virtusers
# 这里的accout是指对用户的帐户有哪些权限哪些限制进行验证。
# 其后的sufficient表示充分条件,也就是说,一旦在这里通过了验证,那么也就不用经过下面剩下的验证步骤了。
# 相反,如果没有通过的话,也不会被系统立即挡之门外,因为sufficient的失败不决定整个验证的失败,意味着用户还必须将经历剩下来>的验证审核。
account sufficient /usr/lib64/security/pam_userdb.so db=/etc/vsftpd/virtusers # 后面的/lib/security/pam_userdb.so表示该条审核将调用pam_userdb.so这个库函数进行。 # 最后的db=/etc/vsftpd/virtusers则指定了验证库函数将到这个指定的数据库中调用数据进行验证。 auth required pam_listfile.so item=user sense=deny file=/etc/vsftpd/ftpusers onerr=succeed auth required pam_shells.so auth include password-auth account include password-auth session required pam_loginuid.so session include password-auth

八、虚拟用户的配置

1.规划好虚拟用户的主路径

[root@vm_0_10_centos tmp]# mkdir /opt/vsftpd

2.建立测试用户的ftp用户目录

[root@vm_0_10_centos tmp]# mkdir /opt/vsftpd/{zs,thy}
[root@vm_0_10_centos tmp]# ls /opt/vsftpd/
thy  zs

3.建立虚拟用户配置文件模版

[root@vm_0_10_centos tmp]# cp /etc/vsftpd/vsftpd.conf.backup /etc/vsftpd/vconf/vconf.tmp

4.定制虚拟用户模版配置文件

[root@vm_0_10_centos tmp]# vi /etc/vsftpd/vconf/vconf.tmp 
# 指定虚拟用户的具体主路径。
local_root=/opt/vsftpd/virtuser
# 设定不允许匿名用户访问。
anonymous_enable=no
# 设定允许写操作。
write_enable=yes
# 设定上传文件权限掩码。
local_umask=022
# 设定不允许匿名用户上传。
anon_upload_enable=no
# 设定不允许匿名用户建立目录。
anon_mkdir_write_enable=no
# 设定空闲连接超时时间。
idle_session_timeout=600
# 设定单次连续传输最大时间。
data_connection_timeout=120
# 设定并发客户端访问个数。
max_clients=10
# 设定单个客户端的最大线程数,这个配置主要来照顾flashget、迅雷等多线程下载软件。
max_per_ip=5
# 设定该用户的最大传输速率,单位b/s。
local_max_rate=50000

这里将原vsftpd.conf配置文件经过简化后保存作为虚拟用户配置文件的模版。将并不需要指定太多的配置内容,主要的框架和限制交由 vsftpd的主配置文件vsftpd.conf来定义,即虚拟用户配置文件当中没有提到的配置项目将参考主配置文件中的设定。而在这里作为虚拟用户的配置文件模版只需要留一些和用户流量控制,访问方式控制的配置项目就可以了。这里的关键项是local_root这个配置,用来指定这个虚拟用户的ftp主路径。

5.更改虚拟用户的主目录的属主为虚拟宿主用户:

[root@vm_0_10_centos tmp]# chown -r vrvsftpd.vrvsftpd /opt/vsftpd/
[root@vm_0_10_centos tmp]# ll /opt/vsftpd/
total 8
drwxr-xr-x 2 vrvsftpd vrvsftpd 4096 oct  9 11:24 thy
drwxr-xr-x 2 vrvsftpd vrvsftpd 4096 oct  9 11:24 zs

九、给测试用户定制

1.从虚拟用户模版配置文件复制

[root@vm_0_10_centos tmp]# cp /etc/vsftpd/vconf/vconf.tmp /etc/vsftpd/vconf/thy

2.针对具体用户进行定制

[root@vm_0_10_centos tmp]# vi /etc/vsftpd/vconf/thy 
# 指定虚拟用户的具体主路径。
local_root=/opt/vsftpd/thy
# 设定不允许匿名用户访问。
anonymous_enable=no
# 设定允许写操作。
write_enable=yes
# 设定上传文件权限掩码。
local_umask=022
# 设定不允许匿名用户上传。
anon_upload_enable=no
# 设定不允许匿名用户建立目录。
anon_mkdir_write_enable=no
# 设定空闲连接超时时间。
idle_session_timeout=300
# 设定单次连续传输最大时间。
data_connection_timeout=90
# 设定并发客户端访问个数。
max_clients=1
# 设定单个客户端的最大线程数,这个配置主要来照顾flashget、迅雷等多线程下载软件。
max_per_ip=1
# 设定该用户的最大传输速率,单位b/s。
local_max_rate=25000

十、启动服务

[root@vm_0_10_centos tmp]# systemctl restart vsftpd
[root@vm_0_10_centos tmp]# systemctl status vsftpd

十一、测试

1.在虚拟用户目录中预先放入文件

[root@vm_0_10_centos tmp]# touch /opt/vsftpd/thy/thy.test

2.从其他机器作为客户端登陆ftp

前提这台机器安装了ftp服务,能使用ftp命令

【Linux服务】vsftpd文件传输协议

 

解决:

可能是pam问题,上面配置vsftpd.conf配置文件时,没有开启pam的验证,将pam验证开启即可

【Linux服务】vsftpd文件传输协议

 

 

 参考网址:

测试登录:

【Linux服务】vsftpd文件传输协议

3.测试列单操作

【Linux服务】vsftpd文件传输协议

解决:

将主动改为被动,然后重新登录ftp

ftp> passive
passive mode on.

【Linux服务】vsftpd文件传输协议

参考网址:

4.测试上传操作

参数使用格式参考网址:

首先现在客户端服务器上当前目录创建hello.txt文件,登录ftp,测试上传

[root@vm_0_16_centos ~]# touch hello.txt
[root@vm_0_16_centos ~]# ftp
ftp> ls
227 entering passive mode (106,53,73,200,241,96).
150 here comes the directory listing.
-rw-r--r--    1 0        0               0 oct 09 03:51 thy.test
226 directory send ok.
ftp> put
(local-file) hello.txt
(remote-file) ftp_hello.txt
local: hello.txt remote: ftp_hello.txt
227 entering passive mode (106,53,73,200,91,237).
150 ok to send data.
226 transfer complete.
30 bytes sent in 3e-05 secs (1000.00 kbytes/sec)

【Linux服务】vsftpd文件传输协议

 

在vsftpd服务端就能看到刚刚上传的文件了

[root@vm_0_10_centos tmp]# ls /opt/vsftpd/thy/
ftp_hello.txt  thy.test

【Linux服务】vsftpd文件传输协议

5.测试建立目录操作

ftp> mkdir ftp_test
257 "/opt/vsftpd/thy/ftp_test" created

【Linux服务】vsftpd文件传输协议

6.测试下载操作

 需要下载的文件,vsftpd服务端必须要有这个文件才行

ftp> get thy.test
local: thy.test remote: thy.test
227 entering passive mode (106,53,73,200,245,241).
150 opening binary mode data connection for thy.test (0 bytes).
226 transfer complete.

 

在/etc/vsftpd/vsftpd.conf中,local_enable的选项必须打开为yes,使得虚拟用户的访问成为可能,否则会出现以下现象:

[root@kcentos5 ~]# ftp
ftp> open ip地址
connected to ip地址.
500 oops: vsftpd: both local and anonymous access disabled!

原因:虚拟用户再丰富,其实也是基于它们的宿主用户overlord的,如果overlord这个虚拟用户的宿主被限制住了,那么虚拟用户也将受到限制。
补充:

500 oops:错误

有可能是你的vsftpd.con配置文件中有不能被识别的命令,还有一种可能是命令的yes 或 no 后面有空格。

550 权限错误,不能创建目录和文件

解决方法: 关闭selinux

# vi /etc/selinux/config

将 selinux=xxx -->xxx 代表级别

改为

selinux=disabled

修改配置文件需要重启

7、通过浏览器访问

输入配置的用户名和密码即可

【Linux服务】vsftpd文件传输协议

 

 

 

 

参考网址:

参数使用格式参考网址: