ftp服务器匿名访问配配置文档(for linux平台)

 

.配置yum,以便安装软件包

   yum全局文件编辑目录:  /etc/yum.repos.d/rhel-source.repo

[root@wanghong ~]# vim //etc/yum.repos.d/rhel-source.repo

#[rhel-source]

#name=Red Hat Enterprise Linux $releasever - $basearch - Source

#baseurl=ftp://ftp.redhat.com/pub/redhat/linux/enterprise/$releasever/en/os/SRPMS/

#enabled=0

#gpgcheck=1

#gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release

 

#[rhel-source-beta]

#name=Red Hat Enterprise Linux $releasever Beta - $basearch - Source

#baseurl=ftp://ftp.redhat.com/pub/redhat/linux/beta/$releasever/en/os/SRPMS/

#enabled=0

#gpgcheck=1

#gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-beta,file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release

[wanghong]

Name=123

Baseurl=file:///mnt/Server

enable=1

gpgcheck=0

备注: #是注释作用,在此对文件没用任何影响,可以去掉

二.安装ftp服务软件包,配置ftp服务

1.ftp服务软件包名:vsftpd-2.2.2-6.el6_0.1.i686.rpm

[root@wanghong ~]#yum install  vsftpd

2.配置目录文件/etc/vsftpd/vsftpd.conf

[root@wanghong ~]#vim /etc/vsftpd/vsftpd.conf

anonymous_enable=YES

local_enable=NO

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

listen=YES

 

download_enable=YES

pam_service_name=vsftpd

userlist_enable=NO

tcp_wrappers=YES

anon_other_write_enable=YES

   备注: 红色区域为修改增加部份,请参照上述文件部署

 

     3.客户端进行测试,访问ftp://192.168.2.3

       测试内容: 是否能上创建文件夹,上传文件,修改文件(重命名,删除),下载文件内容

       注意:该文件或目录的权限可根据自己的需要去设置(一般为707)