zoukankan      html  css  js  c++  java
  • 421 Service not available, remote server has closed connection,Vsftpd 账号登入自动断开连接

    System version:Linux centos7_server 3.10.0-693.el7.x86_64 #1 SMP Tue Aug 22 21:09:27 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux
    [root@centos7_server ~]# ftp 1.1.1.1
    Connected to 1.1.1.1(1.1.1.1).
    220 (vsFTPd 3.0.2)
    Name (1.1.1.1:root): MyD
    331 Please specify the password.
    Password:
    500 OOPS: vsftpd: refusing to run with writable root inside chroot()
    Login failed.
    421 Service not available, remote server has closed connection
    ftp>
    [root@centos7_server ~]# vim /etc/vsftpd/vsftpd.conf
    在配置文件内写入 allow_writeable_chroot=YES, 给账户加入写入权限。
    随后重新启动vsftpd服务, 如果一次解决不了,那就两次。
    [root@centos7_server ~]# ftp 1.1.1.1
    Connected to 1.1.1.1(1.1.1.1).
    220 (vsFTPd 3.0.2)
    Name (1.1.1.1:root): MyD
    331 Please specify the password.
    Password:
    230 Login successful.
    Remote system type is UNIX.
    Using binary mode to transfer files.
    ftp>


    特别补充说明,以上作业动作仅仅是关闭了 Iptables 及 Firewalld,SELinux是开启状态,对SELinux有做一项动作。
    systemctl stop iptables 关闭iptables
    systemctl stop fireawlld 关闭firewalld
    [root@centos7_server ~]# getsebool -a | grep ftpd
    ftpd_anon_write --> off
    ftpd_connect_all_unreserved --> off
    ftpd_connect_db --> off
    ftpd_full_access --> off 把ftpd_full_access 设置为 ftpd_full_access on
    ftpd_use_cifs --> off
    ftpd_use_fusefs --> off
    ftpd_use_nfs --> off
    ftpd_use_passive_mode --> off
    [root@centos7_server ~]# setsebool -P ftpd_full_access on 这个指令的大意为:开启SELinux域中对ftp服务的允许策略
    [root@centos7_server ~]# getsebool -a | grep ftpd
    ftpd_anon_write --> off
    ftpd_connect_all_unreserved --> off
    ftpd_connect_db --> offftpd_full_access --> on
    ftpd_use_cifs --> off
    ftpd_use_fusefs --> off
    ftpd_use_nfs --> off
    ftpd_use_passive_mode --> off
    [root@centos7_server ~]#

    刚入们的超级小白,学习过程当中记录一些异常信息及解决方法。 欢迎大家一起交流。
  • 相关阅读:
    ubuntu(14.4) 安装phpmyadmin
    ubuntu(14.04) 安装ssh,并使用root用户登录
    ubuntu(14.04版本) 配置虚拟环境(一个ip对应多个域名)
    ubuntu 中数据的迁移
    ubuntu修改固定ip
    作业调度框架_Quartz
    tomcat设置端口号和默认webapp
    HTTP深入浅出 http请求
    HTTP协议详解
    如何准备阿里社招面试,顺谈 Java 程序员学习中各阶段的建议【转】
  • 原文地址:https://www.cnblogs.com/JiangDameiniu/p/9075176.html
Copyright © 2011-2022 走看看