Erlo

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

2019-10-09 17:00:26 发布   413 浏览  
页面报错/反馈
收藏 点赞

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方式

 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那个随机的端口连接后,进行数据传输。

  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的那个随机端口进行连接后进行数据传输。

  如果从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%]

参考网址:https://blog.csdn.net/debimeng/article/details/78143071

最后再运行安装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参考网址:https://blog.csdn.net/danson_yang/article/details/65629948

[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码型的数据库文件)

 参考网址:http://blog.itpub.net/20943428/viewspace-661714/

[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命令

 

解决:

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

 

 

 参考网址:https://blog.csdn.net/junjunjiao/article/details/50738009

测试登录:

3.测试列单操作

解决:

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

ftp> passive
Passive mode on.

参考网址:https://blog.csdn.net/indexman/article/details/42649329

4.测试上传操作

参数使用格式参考网址:https://www.jb51.net/article/124033.htm

首先现在客户端服务器上当前目录创建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)

 

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

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

5.测试建立目录操作

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

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、通过浏览器访问

ftp://106.53.73.200/

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

 

 

 

 

参考网址:https://www.cnblogs.com/hhuai/archive/2011/02/12/1952647.html

参数使用格式参考网址:https://www.jb51.net/article/124033.htm

 

登录查看全部

参与评论

评论留言

还没有评论留言,赶紧来抢楼吧~~

手机查看

返回顶部

给这篇文章打个标签吧~

棒极了 糟糕透顶 好文章 PHP JAVA JS 小程序 Python SEO MySql 确认