linux搭建ftp,linux搭建

來源:互聯網
上載者:User

linux搭建ftp,linux搭建

使用RH 系Linux,Debian系請酌情參照

安裝ftp所需包

安裝ftp包

yum -y install ftp

安裝vsftpd包

yum -y install vsftpd

 

註:設定檔路徑   /etc/vsftpd/

建立ftp使用者,並付賦權

建立普通使用者(我這裡使用者名稱為huoher)

useradd huoher

設定該使用者只能使用ftp而不能通過ssh或其他協議登入進來

usermod -s /sbin/nologin huoher

由於使用者是ftp的,不是正常的登入使用者,修改其使用者主目錄(我的是/mnt)

usermod -d /mnt huoher

設定使用者密碼

passwd huoher

可能你是用root建立的目錄,現在更改所有者

chown huoher huoher/
#chown 使用者名稱 目錄名

 

關閉sellinux

setenforce 0

可以試試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.