centos 6 搭建ftp服务器支持匿名读写
转载请注明: 凌云物网智科嵌入式实验室: http://iot-yun.com/ 郭文学<guowenxue@gmail.com>
vsftpd在运行时一定要关闭SELinux,否则ftp用户登录的时候会出问题
vsftpd的配置文件:
[guowenxue@centos6 vsftpd]$ pwd /etc/vsftpd [guowenxue@centos6 vsftpd]$ sudo cat vsftpd.conf anonymous_enable=YES anon_world_readable_only=NO anon_upload_enable=YES anon_mkdir_write_enable=YES anon_other_write_enable=YES no_anon_password=YES chown_uploads=YES chown_username=lingyun delete_failed_uploads=YES local_enable=YES local_root=/var/ftp/ anon_root=/var/ftp/pub write_enable=YES local_umask=022 xferlog_enable=YES xferlog_file=/var/log/vsftpd.log #connect_from_port_20=YES ftpd_banner=Welcome to my FTP service. listen=YES # Ban user leave the home directory chroot_local_user=YES pam_service_name=vsftpd userlist_enable=YES userlist_deny=NO listen_port=21 connect_from_port_20=YES
允许登录的用户列表:
[guowenxue@centos6 vsftpd]$ sudo cat user_list anonymous lingyun
不允许登录的用户列表:
[guowenxue@centos6 vsftpd]$ sudo cat ftpusers # Users that are not allowed to login via ftp root bin daemon adm lp sync shutdown halt mail news uucp operator games nobody