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
相關文章
相關標籤/搜索