zoukankan      html  css  js  c++  java
  • vsftpd:500 OOPS: vsftpd: refusing to run with writable root inside chroot ()错误的解决方法

    参考:

    https://blog.csdn.net/bluishglc/article/details/42399439

    原vsftpd服务器的系统从centos6.8升级到centos7.2。vsftpd使用yum方式安装,用户采用系统用户登录。由于系统升级到centos7,yum安装的vsftpd版本改变。因此按centos6的设置,登录时报错。配置文件未修改,主要是修改了ftp的主目录权限。

    这个问题发生在最新的这是由于下面的更新造成的:
    - Add stronger checks for the configuration error of running with a writeable root directory inside a chroot(). This may bite people who carelessly turned on chroot_local_user but such is life.
     
    从2.3.5之后,vsftpd增强了安全检查,如果用户被限定在了其主目录下,则该用户的主目录不能再具有写权限了!如果检查发现还有写权限,就会报该错误。
     
    要修复这个错误,可以用命令chmod a-w /home/user去除用户主目录的写权限(采用该方式,将用户主目录文件属性修改为#chmod 555)。      
    或者你可以在vsftpd的配置文件中增加下列一项:
     
    allow_writeable_chroot=YES      ##验证在vsftpd.conf中增加该项配置,vsftpd服务无法正常启动。
     

    登录验证:

    配置:
    [root@mail vsftpd]# egrep -v "^#|^$" vsftpd.conf
    anonymous_enable=NO
    local_enable=YES
    write_enable=YES
    local_umask=022
    dirmessage_enable=YES
    xferlog_enable=YES
    connect_from_port_20=YES
    xferlog_std_format=YES
    listen=YES
    pam_service_name=vsftpd
    userlist_enable=YES
    tcp_wrappers=YES
    port_enable=YES
    chroot_list_enable=YES
    chroot_list_file=/etc/vsftpd/chroot_list
    xferlog_file=/var/log/xferlog
    dual_log_enable=yes
    log_ftp_protocol=yes
    vsftpd_log_file=/var/log/vsftpdlogfile
  • 相关阅读:
    php 函数汇总
    php 图片base64编码生成dataurl和保存为图片
    bootstrap
    PHPWord
    js json排序
    UE用法
    判断移动端是苹果还是安卓,以及安卓版本
    shell终极操作
    LINUX yum用法
    jquery对checkbox的操作汇总
  • 原文地址:https://www.cnblogs.com/wplvqj/p/10537070.html
Copyright © 2011-2022 走看看