linux 搭建FTP

使用的是suselinux11,已经设置成功。

1.安装vsftpd

yast ——》 software ------> software management ------> vsftpd

2.启动vsftpd

/etc/init.d/vsftpd start

 

3.启动成功FTP后,修改配置文件:etc/vsftpd.conf文件

(1)执行:vi /etc/vsftpd.conf

(2)修改如下配置项:

# line 18: uncomment ( allow writing ),开启任何用户的写权限

write_enable=YES    


# line 39: uncomment

ls_recurse_enable=YES


# line 59: uncomment ( allow local user ) ,开启本地用户登录服务

local_enable=YES


# line 69: uncomment ( enable chroot )

chroot_local_user=YES


# line 75: uncomment ( enable chroot list )

chroot_list_enable=YES


# line 79: uncomment ( specify chroot list )

chroot_list_file=/etc/vsftpd.chroot_list


# line 91: 不启用匿名访问

anonymous_enable=NO   


 # line 200: uncomment: ( allow ascii mode )

ascii_upload_enable=YES

ascii_download_enable=YES


# add at the bottom: specify  your root directory

local_root=/home/sshd ()

# use local time

use_localtime=YES

 

 

4.重启FTP

/etc/init.d/vsftpd restart

 

5.查看/etc/ftpusers配置

vi /etc/ftpusers

文件中有的用户,都不能使用FTP

 

6.修改TCP端口

(1)修改端口21648

vi /etc/vsftpd.conf

listen_port=21648

 

(2)编辑文件/etc/services,修改端口为21648

vi /etc/services

 

ftp   21648/tcp   # File Transfer [Control] [Jon_Postel] [RFC959]
ftp   21648/udp    # File Transfer [Control] [Jon_Postel] [RFC959]
ftp    21648/sctp    # FTP [Randall_Stewart] [RFC4960]

 

posted on 2017-07-07 10:19  Eugenebo  阅读(167)  评论(0编辑  收藏  举报

导航