首页 > 服务器 > Ftp服务器 > 正文

vsftp限制FTP用户在特定目录

2019-12-22 20:59:13
字体:
来源:转载
供稿:网友
vsftp限制FTP用户在特定目录

用户配置目录:/etc/vsftpd/user.d为每个用户建立配置文件比如:#/etc/vsftpd/user.d/Tom编辑Tom文件,加入以下内容local_root=/home/hyq/ftp/tom#Endvi /etc/vsftpd/vsftpd.conf加上以下几行:chroot_list_enable=YESchroot_local_user=YESchroot_list_file=/etc/vsftpd/chroot_listuser_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命令启动vsftpd2.使用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 1service vsftpd restart这是因为SE设置的关闭了ftp的原因。 使用命令 getsebool ftpd_disable_trans 可以查看当前的状态如果不是on ,那么输入命令 setsebool ftpd_disable_trans 1 ,当然也可以加入-P参数,以便不需要每次开机都输入这个命令 setsebool -P ftpd_disable_trans 1


发表评论 共有条评论
用户名: 密码:
验证码: 匿名发表