


CentOS下安裝使用FTP服務(wù)器端程序ProFTPd
添加時(shí)間:2019-5-29 23:04:50
添加:
思海網(wǎng)絡(luò)
安裝:
安裝EPEL軟件包
rpm -Uvh http://download.fedora.redhat.com/pub/epel/5/i386/epel-release-5-4.noarch.rpm
YUM安裝ProFTPd
yum install proftpd
編譯安裝ProFTPd的方法
wget ftp://ftp-stud.fht-esslingen.de/pub/Mirrors/ftp.proftpd.net/distrib/source/proftpd-1.3.1.tar.gz
tar xzvf proftpd-1.3.1.tar.gz
cd proftpd-1.3.1
./configure --with-modules=mod_sql:mod_sql_mysql:mod_quotatab:mod_quotatab_sql \
--with-includes=/usr/include/mysql \
--with-libraries=/usr/lib/mysql
make && make install
設(shè)置開(kāi)機(jī)啟動(dòng)
chkconfig --level 3 proftpd on
ProFTPd管理:
啟動(dòng):
proftpd:service proftpd start
停止:
proftpd:service proftpd stop
重啟:
proftpd:service proftpd restart
重載:
proftpd:service proftpd reload
配置文件/etc/proftpd.conf,可以通過(guò)proftpd -t6指令檢測(cè)語(yǔ)法是否正確。
添加ftp用戶和用戶組
groupadd -g 5500 ftpgroup
adduser -u 5500 -s /bin/false -d /bin/null -c "proftpd user" -g ftpgroup ftpuser
添加虛擬用戶
首先我們需要設(shè)置配置文件/etc/proftpd.conf。
添加下面代碼進(jìn)配置文件:
AuthUserFile /etc/ftpd.passwd
AuthGroupFile /etc/ftpd.group
關(guān)閉檢測(cè)/etc/shells:
RequireValidShell off
設(shè)置僅使用虛擬用戶認(rèn)證:
AuthOrder mod_auth_file.c
禁止PAM認(rèn)證:
PersistentPasswd off
AuthPAM off
限制改變根目錄:
DefaulRoot ~
按照上面的要求設(shè)置好配置文件后,我們使用ftpasswd工具來(lái)添加虛擬用戶,首先下載這個(gè)工具。
cd /usr/sbin/
wget http://www.castaglia.org/proftpd/contrib/ftpasswd
chmod +x ftpasswd
ftpasswd工具的格式如下:
# ftpasswd --passwd --name {username} --file /etc/ftpd.passwd --uid {5000} --gid {5000} --home /var/ftp/username-home/ --shell /bin/false
# ftpasswd --group --name group1 –file /etc/ftpd.group --gid 5000 --member username
關(guān)鍵字:CentOS、安裝、FTP、服務(wù)器端、程序
新文章:
- CentOS7下圖形配置網(wǎng)絡(luò)的方法
- CentOS 7如何添加刪除用戶
- 如何解決centos7雙系統(tǒng)后丟失windows啟動(dòng)項(xiàng)
- CentOS單網(wǎng)卡如何批量添加不同IP段
- CentOS下iconv命令的介紹
- Centos7 SSH密鑰登陸及密碼密鑰雙重驗(yàn)證詳解
- CentOS 7.1添加刪除用戶的方法
- CentOS查找/掃描局域網(wǎng)打印機(jī)IP講解
- CentOS7使用hostapd實(shí)現(xiàn)無(wú)AP模式的詳解
- su命令不能切換root的解決方法
- 解決VMware下CentOS7網(wǎng)絡(luò)重啟出錯(cuò)
- 解決Centos7雙系統(tǒng)后丟失windows啟動(dòng)項(xiàng)
- CentOS下如何避免文件覆蓋
- CentOS7和CentOS6系統(tǒng)有什么不同呢
- Centos 6.6默認(rèn)iptable規(guī)則詳解