centos 6.4 安裝配置vsftp

來源:互聯網
上載者:User

標籤:vsftpd 虛擬使用者登入

  1. yum install vsftpd  db4-utils

  2. 因為要使用虛擬使用者登入.

    修改如下檔案 a:/etc/pam.d/vsftpd ;添加兩行

auth required /lib64/security/pam_userdb.so db=/etc/vsftpd/vftpuser

account required /lib64/security/pam_userdb.so db=/etc/vsftpd/vftpuser

系統64位  很多網上資料 寫的是/lib/security/pam_userdb.so 這裡要改一下

3.  設定檔 vsftpd.conf

    

listen=YES


local_enable=YES

write_enable=YES

local_umask=022

dirmessage_enable=YES

xferlog_enable=YES

connect_from_port_20=YES

xferlog_std_format=YES

userlist_enable=YES

tcp_wrappers=YES



anonymous_enable=NO

guest_enable=YES

guest_username=ftpadmin   #虛擬目錄對應的帳號

pam_service_name=vsftpd

anon_world_readable_only=NO

anon_upload_enable=YES

anon_mkdir_write_enable=YES

anon_other_write_enable=YES

user_config_dir=/etc/vsftpd/vsftpd_user_conf #配置虛擬使用者的單獨配置路徑,如家目錄等

anon_umask=022


4. 添加使用者ftpadmin

5. 添加使用者名稱密碼 到檔案vftpuser.txt 

    格式為  使用者名稱

            密碼

6. db_load -T -t hash -f /etc/vsftpd/vftpuser.txt /etc/vsftpd/vftpuser.db 密碼產生到資料檔案


7./etc/rc.d/init.d/vsftpd restart 重啟即可


設定檔後不能有空格 否則會報錯,比如上面加入注釋的地方。

要允許local_enable=YES 否則530登入報錯  還有逾時錯誤還不清楚原因



本文出自 “好記性不如爛筆頭” 部落格,請務必保留此出處http://cobweb.blog.51cto.com/390607/1585396

centos 6.4 安裝配置vsftp

相關文章

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.