Linux下实现FTP匿名用户访问

secondid 2007-11-29

Linux下怎样才能实现FTP匿名用户访问呢?下面说说详细过程:

一、说明
1、配置文件:
/etc/vsftpd/vsftpd.conf

2、默认匿名用户:
more /etc/passwd
ftp:x:14:50:FTP User:/var/ftp:/sbin/nologin

二、举例
用系统匿名用户FTP登陆访问FTP目录,只赋予下载权限,FTP目录指定到/home/ftp

1、修改配置文件
# vi /etc/vsftpd/vsftpd.conf
local_enable=NO
connect_from_port_20=YES
listen=YES
listen_port=21
tcp_wrappers=YES
anonymous_enable=YES
ftp_username=ftp
no_anon_password=YES
anon_root=/home/ftp
anon_world_readable_only=YES

2、重启ftp服务
#service vsftpd restart

3、如果出现421 Service not available, remote server has closed connection错误
vi  /etc/hosts.allow
添加:
vsftpd:ALL

相关推荐