linux 搭建ftp 针对不给开20号端口的搭建方法
来源:互联网 发布:数据恢复精灵离线激活 编辑:程序博客网 时间:2024/06/09 06:32
1.添加用户并设置密码
~ $ useradd tom1 -s /sbin/nologin
2.创建映射目录
tom1 $ mkdir ey_htdocs
3.设置权限
tom1 $ chmod -R 777 ey_htdocs
4.挂载目录,并把下面语句添加到/etc/rc.local文件里
~ $ mount --bind -o wr /data/htdocs /home/wuguoqiang/ey_htdocs/
~ $ mount --bind -o wr /data/htdocs /home/liushaobo/ey_htdocs/
5.安装vsftpd
~ $ yum -y vsftpd
6.配置 vstpd.conf
vsftpd $ cat vsftpd.conf | grep -v '^#'
anonymous_enable=NO
connect_timeout=300
local_enable=YES
write_enable=YES
local_umask=022
anon_upload_enable=YES
anon_mkdir_write_enable=YES
dirmessage_enable=YES
xferlog_enable=YES
connect_from_port_20=YES
xferlog_std_format=YES
data_connection_timeout=300
chroot_list_enable=YES
chroot_list_file=/etc/vsftpd/chroot_list
listen=YES
pam_service_name=vsftpd
userlist_enable=YES
tcp_wrappers=YES
chroot_list_enable=YES
pasv_max_port=51003
pasv_min_port=51001
file_open_mode=0777
local_umask=0000
7.在/etc/vsftpd/chroot_list 文件里添加用户名
8.启动vsftpd服务
vsftpd $ service vsftpd start
9.测试成功与否,如果连接不成功,确认该开的端口都开了的话,检查下SELinux是否关闭
vsftpd $ sestatus
查看当前SELinux设置和状态
SELinux status: enabled
SELinuxfs mount: /selinux
Current mode: enforcing 注意这个
Mode from config file: disabled
Policy version: 24
Policy from config file: targeted
设置和修改SELinux状态
vsftpd $ setenforce 0
vsftpd $ sestatus
SELinux status: enabled
SELinuxfs mount: /selinux
Current mode: permissive
Mode from config file: disabled
Policy version: 24
Policy from config file: targeted
10.修改了如上配置,ftp就能正常登陆了
- linux 搭建ftp 针对不给开20号端口的搭建方法
- Linux 下Ftp的搭建
- Linux FTP----vsftpd的搭建
- Linux下的ftp搭建
- Linux FTP服务器的搭建
- Linux下最简单的FTP服务器搭建方法
- Redhat linux搭建ftp
- linux ftp搭建
- linux ftp 服务器搭建
- linux 下搭建 ftp
- Linux搭建FTP服务
- linux 搭建 ftp 服务器
- linux下搭建ftp
- linux搭建ftp
- Linux 下FTP搭建
- linux下搭建FTP
- linux 搭建FTP服务
- linux搭建ftp服务器
- Ajax 改造,第 1 部分: 使用 Ajax 和 jQuery 改进现有站点
- 【线段树求LCIS】HDU 3308
- U盘杀毒软件U盘Clear
- jQuery-对Select的操作集合
- Ajax 改造,第 2 部分: 使用 jQuery、Ajax、工具提示和 lightbox 改进现有站点
- linux 搭建ftp 针对不给开20号端口的搭建方法
- 批量提交Bsub命令
- Ajax 改造,第 3 部分: 用 jQuery、Ajax 选项卡和照片 carousel 改进现有的站点
- 今天碰到个错误,ile was built for unsupported file format which is not the architecture being linked (armv7)
- Ajax 改造,第 4 部分: 用 jQuery 和 Ajax 表单改造现有站点
- HyperTerminal Alternatives for Windows 7 ---by Aseem
- Jquery Select操作方法集合
- iphone开发基础三和c语言混编
- [转贴]俞天任:日本家电行业还能起死回生吗