CentOS 7.1雲端服務器 配置FTP伺服器vsftpd

來源:互聯網
上載者:User

標籤:

在root許可權下,通過如下命令安裝Vsftp:

yum install vsftpd

 

使用rpm命令即可查看是否已經安裝vsftpd: 

rpm -qa|grep vsftpd

 

在啟動vsftpd服務之前,需要登入雲端服務器修改設定檔,將匿名登入禁用掉。

1、開啟設定檔,命令如下:

vim /etc/vsftpd/vsftpd.conf

 

在設定檔中第11行的“anonymous_enable=YES”改為“anonymous_enable=NO”,即將匿名登入禁用。

X按鈕為VIM中的退格,修改完畢後按ESC鍵:鍵輸入wq儲存退出

2、讀取生效配置。

cat /etc/vsftpd/vsftpd.conf |grep ^[^#] anonymous_enable=NOlocal_enable=YESwrite_enable=YESlocal_umask=022anon_upload_enable=YESanon_mkdir_write_enable=YESanon_umask=022dirmessage_enable=YESxferlog_enable=YESconnect_from_port_20=YESxferlog_std_format=YESlisten=YESpam_service_name=vsftpduserlist_enable=YEStcp_wrappers=YES

 

4. 啟動vsftpd服務

service vsftpd start

 

5. 設定FTP使用者帳號。設定成功後,即可通過該帳號登入FTP伺服器。
(1)設定FTP使用者的帳號,例如帳號為“user1”,目錄為/home/user1,且設定不允許通過ssh登入。

useradd -m -d /home/user1 -s /sbin/nologin user1

 

(2)設定帳號對應的密碼

passwd user1

 

CentOS 7.1雲端服務器 配置FTP伺服器vsftpd

相關文章

聯繫我們

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