Ubuntu14.04 vsftpd安装与配置

来源:互联网 发布:淘宝团扇 编辑:程序博客网 时间:2024/06/05 21:06

安装:

apt-get install vsftpd


相关配置文件:

/etc/vsftpd.conf


日志文件:

/var/log/vsftpd.log

使用模式:

本地用户登陆(root)

具体配置方式:

vi /etc/vsftpd.conf

# Allow anonymous FTP? (Disabled by default)anonymous_enable=NO## Uncomment this to allow local users to log in.local_enable=YES## Uncomment this to enable any form of FTP write command.write_enable=YES...chroot_local_user=YESchroot_list_enable=YES# (default follows)chroot_list_file=/etc/vsftpd.chroot_list

vi /etc/pam.d/vsftpd

# Standard behaviour for ftpd(8).auth    required        pam_listfile.so item=user sense=deny file=/etc/ftpusers onerr=succeed

file=/etc/ftpusers 里面就是被拒绝登陆的系统用户

打开/etc/ftpusers,删除掉root用户

再编辑/etc/vsftpd.chroot_list

vi /etc/vsftpd.chroot_list

将root添加进文件,保存退出。


service vsftpd restart

重启服务。


再用root用户登陆ftp,看是否成功。


如果FTP登陆失败,提示:

500 OOPS: prctl PR_SET_SECCOMP failed

请在vsftpd.conf里加上seccomp_sandbox=no


祝你好运。




0 0
原创粉丝点击