Centos7安装vsftpd,匿名及用户名密码访问

FTP
   ftp协议的连接模式:
       主动连接
       被动连接
       
    软件:vsftpd
配置文件:/etc/vsftpd/vsftpd.conf
anon_upload_enable=YES       允许上传文件
anon_mkdir_write_enable=YES    允许上传目录
anon_other_write_enable=YES    允许其他的修改(删除、重命名等)
anon_root=/XXXX               更改匿名用户的ftp的根目录
加行:anon_umask=022   允许其他用户下载匿名用户的文件


[root@dhcpserver /]# rpm -q vsftpd
vsftpd-3.0.2-25.el7.x86_64
[root@dhcpserver /]# systemctl start vsftpd
[root@dhcpserver /]# systemctl enable vsftpd
Created symlink from /etc/systemd/system/multi-user.target.wants/vsftpd.service to /usr/lib/systemd/system/vsftpd.service.
[root@dhcpserver /]# ss -antp | grep vsftpd
LISTEN     0      32          :::21                      :::*                   users:(("vsftpd",pid=6691,fd=4))
[root@dhcpserver ftp]# cat /etc/passwd | grep ftp
ftp:x:14:50:FTP User:/var/ftp:/sbin/nologin
[root@dhcpserver ftp]# ls
pub
[root@dhcpserver ftp]#

 客户端
[root@dinghaijun network-scripts]# yum install -y lftp
已加载插件:fastestmirror
Loading mirror speeds from cached hostfile
 * base: mirrors.aliyun.com
 * extras: mirrors.163.com
 * updates: mirrors.163.com
正在解决依赖关系
--> 正在检查事务
---> 软件包 lftp.x86_64.0.4.4.8-11.el7 将被 安装
--> 正在处理依赖关系 libgnutls.so.28(GNUTLS_1_4)(64bit),它被软件包 lftp-4.4.8-11.el7.x86_64 需要
--> 正在处理依赖关系 libgnutls.so.28()(64bit),它被软件包 lftp-4.4.8-11.el7.x86_64 需要
--> 正在检查事务
---> 软件包 gnutls.x86_64.0.3.3.29-9.el7_6 将被 安装
--> 正在处理依赖关系 trousers >= 0.3.11.2,它被软件包 gnutls-3.3.29-9.el7_6.x86_64 需要
--> 正在处理依赖关系 libnettle.so.4()(64bit),它被软件包 gnutls-3.3.29-9.el7_6.x86_64 需要
--> 正在处理依赖关系 libhogweed.so.2()(64bit),它被软件包 gnutls-3.3.29-9.el7_6.x86_64 需要
--> 正在检查事务
---> 软件包 nettle.x86_64.0.2.7.1-8.el7 将被 安装
---> 软件包 trousers.x86_64.0.0.3.14-2.el7 将被 安装
--> 解决依赖关系完成

依赖关系解决

=======================================================================================================================================================================
 Package                                架构                                 版本                                          源                                     大小
=======================================================================================================================================================================
正在安装:
 lftp                                   x86_64                               4.4.8-11.el7                                  base                                  752 k
为依赖而安装:
 gnutls                                 x86_64                               3.3.29-9.el7_6                                updates                               680 k
 nettle                                 x86_64                               2.7.1-8.el7                                   base                                  327 k
 trousers                               x86_64                               0.3.14-2.el7                                  base                                  289 k

事务概要
=======================================================================================================================================================================
安装  1 软件包 (+3 依赖软件包)

总下载量:2.0 M
安装大小:5.9 M
Downloading packages:
(1/4): nettle-2.7.1-8.el7.x86_64.rpm                                                                                                            | 327 kB  00:00:04     
(2/4): trousers-0.3.14-2.el7.x86_64.rpm                                                                                                         | 289 kB  00:00:04     
(3/4): gnutls-3.3.29-9.el7_6.x86_64.rpm                                                                                                         | 680 kB  00:00:04     
(4/4): lftp-4.4.8-11.el7.x86_64.rpm                                                                                                             | 752 kB  00:00:28     
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------
总计                                                                                                                                    72 kB/s | 2.0 MB  00:00:28     
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
  正在安装    : nettle-2.7.1-8.el7.x86_64                                                                                                                          1/4 
  正在安装    : trousers-0.3.14-2.el7.x86_64                                                                                                                       2/4 
  正在安装    : gnutls-3.3.29-9.el7_6.x86_64                                                                                                                       3/4 
  正在安装    : lftp-4.4.8-11.el7.x86_64                                                                                                                           4/4 
  验证中      : trousers-0.3.14-2.el7.x86_64                                                                                                                       1/4 
  验证中      : gnutls-3.3.29-9.el7_6.x86_64                                                                                                                       2/4 
  验证中      : lftp-4.4.8-11.el7.x86_64                                                                                                                           3/4 
  验证中      : nettle-2.7.1-8.el7.x86_64                                                                                                                          4/4 

已安装:
  lftp.x86_64 0:4.4.8-11.el7                                                                                                                                           

作为依赖被安装:
  gnutls.x86_64 0:3.3.29-9.el7_6                          nettle.x86_64 0:2.7.1-8.el7                          trousers.x86_64 0:0.3.14-2.el7                         

完毕!
[root@dinghaijun network-scripts]# lftp 192.168.138.137
lftp 192.168.138.137:~> ls                
drwxr-xr-x    2 0        0               6 Oct 30  2018 pub 

以上是匿名


用户认证访问,不不需要改任何配置,只需建立响应的用户及设置密码,通过客户端lftp  ip  -u  用户名

  • 0
    点赞
  • 4
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值