centos7安裝vsftpd的步驟

來源:互聯網
上載者:User

centos7安裝vsftpd的步驟

感覺很坑,按照網上說的沒一個都測試了,可一直都報錯。

不斷的重新安裝不下10次,最後一次終於測試出了正確的方法。

#官網配置說明##

https://security.appspot.com/vsftpd/vsftpd_conf.html

##需求##

1)登入FTP 只能看到目前使用者的,不能跨越到主目錄

2)禁止匿名使用者登入FTP

3)修改FTP 監聽連接埠號碼!

##問題##

yum install vsftpd

結果一大堆問題,

1)無法啟動 systemctl stop vsftpd --> 成功過,第二行 systemctl start vsftpd ==> 一直報錯一直報錯

 

[root@niche vsftpd]# whereis vsftpdvsftpd: /usr/sbin/vsftpd /etc/vsftpd /usr/share/man/man8/vsftpd.8.gz[root@niche vsftpd]# systemctl status vsftpdvsftpd.service - Vsftpd ftp daemon   Loaded: loaded (/usr/lib/systemd/system/vsftpd.service; disabled)   Active: failed (Result: exit-code) since Wed 2014-12-17 15:16:58 UTC; 18min a                                                              goDec 17 15:16:58 niche systemd[1]: vsftpd.service: control process exited, c...=2Dec 17 15:16:58 niche systemd[1]: Failed to start Vsftpd ftp daemon.Dec 17 15:16:58 niche systemd[1]: Unit vsftpd.service entered failed state.Dec 17 15:17:25 niche systemd[1]: Stopped Vsftpd ftp daemon.Dec 17 15:23:12 niche systemd[1]: Stopped Vsftpd ftp daemon.Dec 17 15:26:11 niche systemd[1]: Stopped Vsftpd ftp daemon.Dec 17 15:33:55 niche systemd[1]: Stopped Vsftpd ftp daemon.Dec 17 15:34:11 niche systemd[1]: Stopped Vsftpd ftp daemon.Hint: Some lines were ellipsized, use -l to show in full.[root@niche vsftpd]# systemctl stop vsftpd[root@niche vsftpd]# systemctl start vsftpdJob for vsftpd.service failed. See 'systemctl status vsftpd.service' and 'journalctl -xn' for details.[root@niche vsftpd]#

 

最後的解決辦法,手動殺死 進程。ps auxf | grep vsftpd。

然後在重啟 systemctl start vsftpd,又可以使用systemctl來控制vsftpd了,真的是有點出鬼?

2)禁用匿名使用者,本來一開始就修改了vsftpd.conf,但是怎麼都無法重啟無法生效。現在手動殺死進程才可以。

3)鎖定在根目錄,禁止local使用者跳出根目錄。測試了很多次最後這一行才可以:

chroot_local_user=NO
chroot_list_enable=YES
# (default follows)
chroot_list_file=/etc/vsftpd/chroot_list

4)修改監聽連接埠號碼:設定檔結尾加入新的連接埠號碼,listen_port=801,然後重啟!(by default.fu@foxmail.com)

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在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.