ftp服務器匿名訪問配配置文檔(for linux平臺)

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)

 

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章