centos 搭建ftp伺服器

來源:互聯網
上載者:User

標籤:

1.安裝vsftpd

sudo yum install vsftpd

2.配置vsftpd.conf

# Allow anonymous FTP? (Beware - allowed by default if you comment this out).anonymous_enable=NO# When SELinux is enforcing check for SE bool ftp_home_dirlocal_enable=YESwrite_enable=YES# 本地的ftp目錄位址local_root=/var/ftp

3.添加ftp使用者

#建立使用者adduser -d /var/ftp -g ftp -s /sbin/nologin *_ftp#修改密碼passwd *_ftp

4.上傳許可權

# 修改上傳路徑許可權  777   更具個人喜好設定許可權sudo chmod -R 777 /var/ftp# 查看 ftp 設定getsebool -a|grep ftpftp_home_dir --> onftpd_anon_write --> offftpd_connect_all_unreserved --> offftpd_connect_db --> offftpd_full_access --> onftpd_use_cifs --> offftpd_use_fusefs --> offftpd_use_nfs --> offftpd_use_passive_mode --> offhttpd_can_connect_ftp --> offhttpd_enable_ftp_server --> offsftpd_anon_write --> offsftpd_enable_homedirs --> offsftpd_full_access --> offsftpd_write_ssh_home --> offtftp_anon_write --> offtftp_home_dir --> off# 修改ftp_home_dir、ftpd_full_access  為 onsetsebool -P ftp_home_dir=on ftpd_full_access=on

5.設定vsftp 開機啟動

chkconfig vsftpd on

6.添加防火牆

firewall-cmd --permanent --add-service=ftpfirewall-cmd --reload

 

centos 搭建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.