• vsftp限制FTP用户在特定目录


    用户配置目录:/etc/vsftpd/user.d
    为每个用户建立配置文件
    比如:
    #/etc/vsftpd/user.d/Tom
    编辑Tom文件,加入以下内容
    local_root=/home/hyq/ftp/tom
    #End

    vi /etc/vsftpd/vsftpd.conf
    加上以下几行:
    chroot_list_enable=YES
    chroot_local_user=YES
    chroot_list_file=/etc/vsftpd/chroot_list
    user_config_dir=/etc/vsftpd/user.d

    然后重启VSFTPD服务service vsftpd restart

    vsftp 出现500 OOPS: could not bind listening IPv4 socket 的解决方法
    原因:因为同时指定了 inetd和standalone 两种运行方式,端口冲突了.
    解决方法:
    1.使用XINET模式
    去掉/etc/rc.local文件中的vsftpd的启动脚本/usr/local/sbin/vsftp &
    重启xinetd服务,  service xinetd restart
    运行service vsftpd restart命令启动vsftpd

    2.使用STANDALONE独立模式
    在服务器的负担比较重的情况下最好用这个模式
    或者直接修改/etc/xinetd.d/vsftpd文件,把disable=no改成disable=yes就行了!

    service vsftpd start时出现Starting vsftpd for vsftpd: [ FAILED ]
    修改/etc/logrotate.d/vsftpd.log
    把 missingok 注释掉

    ########################################################################
    vsftpd服务器连接失败,错误提示:

    500 OOPS: cannot change directory:/home/*******

    解决方法:

    在终端输入命令:

    setsebool ftpd_disable_trans 1

    service vsftpd restart
    这是因为SE设置的关闭了ftp的原因。 使用命令 getsebool ftpd_disable_trans 可以查看当前的状态如果不是on ,
    那么输入命令 setsebool ftpd_disable_trans 1 ,当然也可以加入-P参数,
    以便不需要每次开机都输入这个命令 setsebool -P ftpd_disable_trans 1

  • 相关阅读:
    CF 848C
    BZOJ 4025 二分图
    支配树学习笔记
    CF1120D Power Tree
    Codeforces 360A(找性质)
    Codeforces 142D(博弈)
    Codeforces 142B(二分染色、搜索)
    GYM 101981E(开关反转性质)
    Codeforces 1150E(树、线段树)
    Codeforces 1150D(字符串dp)
  • 原文地址:https://www.cnblogs.com/latma/p/3817375.html
Copyright © 2020-2023  润新知