centos 6 搭建ftp服务器支持匿名读写

转载请注明: 凌云物网智科嵌入式实验室: http://iot-yun.com/     郭文学<guowenxue@gmail.com>  centos

 

vsftpd在运行时必定要关闭SELinux,不然ftp用户登陆的时候会出问题bash

 

vsftpd的配置文件:blog

[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

 

容许登陆的用户列表:it

[guowenxue@centos6 vsftpd]$ sudo cat user_list 
anonymous
lingyun

  

不容许登陆的用户列表:io

[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
相关文章
相关标签/搜索