银河麒麟 FTP环境安装

安装vsftpd

yum -y install vsftpd

修改vsftpd配置文件

vim /etc/vsftpd/vsftpd.conf

修改下列项

anonymous_enable=NO   限制匿名用户访问
local_enable=YES   启用本地系统用户访问; NO        ##本地用户登陆限制
write_enable=YES   本地系统用户写入权限; NO        ##本地用户写权限限制

设定支持ASCII模式的上传和下载功能。
ascii_upload_enable=YES
ascii_download_enable=YES

pam_service_name=vsftpd       登录FTP服务器,依据/etc/pam.d/vsftpd中内容进行认证;
userlist_enable=YES                  Vsftpd.user_list和ftpusers配置文件里用户禁止访问FTP;
#tcp_wrappers=YES                    设置vsftpd与tcp wrapper结合进行主机的访问控制,Vsftpd服务器检

用户白名单建立
chroot_local_user=YES
chroot_list_enable=YES
chroot_list_file=/etc/vsftpd/chroot_list   默认所有人都不可以登陆,出现在名单中的可以登陆。没有这个文件可以建立

local_root=/data/ftp/  默认路径

listen_port=21  端口
最终配置
# Example config file /etc/vsftpd/vsftpd.conf
#
# The default compiled in settings are fairly paranoid. This sample file
# loosens things up a bit, to make the ftp daemon more usable.
# Please see vsftpd.conf.5 for all compiled in defaults.
#
# READ THIS: This example file is NOT an exhaustive list of vsftpd options.
# Please read the vsftpd.conf.5 manual page to get a full idea of vsftpd's
# capabilities.
#
# Allow anonymous FTP? (Beware - allowed by default if you comment this out).
anonymous_enable=NO
#
# Uncomment this to allow local users to log in.
# When SELinux is enforcing check for SE bool ftp_home_dir
local_enable=YES
#
# Uncomment this to enable any form of FTP write command.
write_enable=YES
#
# Default umask for local users is 077. You may wish to change this to 022,
# if your users expect that (022 is used by most other ftpd's)
local_umask=022
#
# Uncomment this to allow the anonymous FTP user to upload files. This only
# has an effect if the above global write enable is activated. Also, you will
# obviously need to create a
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
红包 添加红包
表情包 插入表情
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值