linux ftp服務

來源:互聯網
上載者:User

標籤:

1 安裝ftp服務
[[email protected] ~]# yum install vsftpd

2編輯vsftpd的設定檔
[[email protected] ~]# vi /etc/vsftpd/vsftpd.conf
anonymous_enable=NO #禁止匿名訪問
ascii_upload_enable #允許使用ascii碼上傳
ascii_download_enable #允許使用ascii碼下載
userlist_deny=NO #(這條需手動添加到最後)

啟動vsftpd服務/etc/init.d/vsftpd start
添加開機自動啟動,chkconfig vsftpd on

chkconfig - - list 是否已經加入了開機啟動項


3能訪問的使用者添加
添加使用者
uploaduseradd upload
密碼
uploadpasswd upload
vi /etc/vsftpd/user_list,將裡面其它初始使用者全部刪除,加入剛剛我們建立的upload使用者,這樣子就只有upload能上傳。

4linux關閉selinux


1、關閉iptables

#service iptables stop

2、關閉SELinux

#vi /etc/selinux/config

將檔案中的SELINUX="" 為 disabled ,然後重啟。
如果不想重啟系統,使用命令setenforce 0


reboot重啟Linux伺服器
reboot
使用FTP登入查看
輸入地址,ftp的帳號和密碼

5如何修改使得所有使用者具有上傳的許可權
檔案在/var/www/html 下,能下載,但是不能上傳
chmod 777 /var/www/html
OK!

 

linux ftp服務

聯繫我們

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