標籤:linux kali linux proftpd
1,安裝ProFTPD
在ftp://ftp.proftpd.org/下可以找到官方發布的各個ProFTPD版本,本人使用ftp://ftp.proftpd.org/historic/source/proftpd-1.3.0a.tar.gz
[email protected]:~# wget ftp://ftp.proftpd.org/historic/source/proftpd-1.3.0a.tar.gz
[email protected]:~# tar –xf proftpd-1.3.0a.tar.bz2 (或tar zxvf proftpd-1.3.0a.tar.gz)
[email protected]: ~# cd proftpd-1.3.0a
[email protected]:~# ./configure --prefix=/var/proftpd --sysconfdir=/etc //設定安裝目錄/var/proftpd, 設定檔目錄/etc
註:如果這一步出現錯誤
configure: error: C++ preprocessor “/lib/cpp” sanity check
check See ‘config.log‘ for more details
那是說明,C++編譯器的相關package沒有安裝或者是缺少核心標頭檔包。
解決方案:
1,在終端執行 apt-get install glibc-headers gcc-c++
2,apt-get install build-essential
uname -r
apt-get install linux-headers-‘kernel version‘
[email protected]:/proftpd-1.3.0a#make //編譯
[email protected]:/proftpd-1.3.0a# make install //安裝
2,配置ProFTPD
[email protected]:/proftpd-1.3.0a# groupadd kevin //建kevin組
[email protected]:/proftpd-1.3.0a# useradd kevin –g kevin –d /var/ftp –s /sbin/nologin //添加使用者kevin
註:需在/etc/shells檔案中添加一行“/sbin/nologin”(否則在登入ftp時會出現登入失敗的錯誤)
[email protected]:/proftpd-1.3.0a# passwd kevin //設定密碼
[email protected]:/proftpd-1.3.0a# mkdir /var/ftp //建立目錄
[email protected]:/proftpd-1.3.0a# chgrp kevin /var/ftp //將ftp目錄的所屬組改為kevin
[email protected]:/proftpd-1.3.0a# chmod –R 755 /var/ftp //改變ftp目錄許可權為屬主全部許可權,同組和其他為可讀許可權
[email protected]:/proftpd-1.3.0a# vim /etc/proftpd.conf //修改設定檔
把User nobody改為User kevin,Group nogroup改成Group kevin。
[email protected]:/proftpd-1.3.0a# /var/proftpd/sbin/proftpd //啟動服務
使用ifconfig查看ip地址,比如為192.168.121.129。
[email protected]:~# ftp 192.168.121.129
然後輸入建立的使用者名稱和密碼即可。
或者,在瀏覽器輸入ftp://192.168.121.129,彈出介面,登陸。