CentOS下安装使用FTP服务器端程序ProFTPd的教程

2023-12-04 0 873

安装:

安装EPEL软件包复制代码代码如下:rpm -Uvh http://download.fedora.redhat.com/pub/epel/5/i386/epel-release-5-4.noarch.rpmYUM安装ProFTPd复制代码代码如下:yum install proftpdPS:编译安装ProFTPd的方法复制代码代码如下:wget ftp://ftp-stud.fht-esslingen.de/pub/Mirrors/ftp.proftpd.net/distrib/source/proftpd-1.3.1.tar.gztar xzvf proftpd-1.3.1.tar.gzcd 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/mysqlmake && make install

设置开机启动复制代码代码如下:chkconfig –level 3 proftpd onProFTPd管理:启动复制代码代码如下:proftpd:service proftpd start停止复制代码代码如下:proftpd:service proftpd stop重启复制代码代码如下:proftpd:service proftpd restart重载复制代码代码如下:proftpd:service proftpd reload配置文件/etc/proftpd.conf,可以通过proftpd -t6指令检测语法是否正确。

添加ftp用户和用户组复制代码代码如下:groupadd -g 5500 ftpgroupadduser -u 5500 -s /bin/false -d /bin/null -c \”proftpd user\” -g ftpgroup ftpuser

添加虚拟用户首先我们需要设置配置文件/etc/proftpd.conf。添加下面代码进配置文件:复制代码代码如下:AuthUserFile /etc/ftpd.passwdAuthGroupFile /etc/ftpd.group关闭检测/etc/shells:复制代码代码如下:RequireValidShell off设置仅使用虚拟用户认证:复制代码代码如下:AuthOrder mod_auth_file.c禁止PAM认证:复制代码代码如下:PersistentPasswd offAuthPAM off限制改变根目录:复制代码代码如下:DefaulRoot ~按照上面的要求设置好配置文件后,我们使用ftpasswd工具来添加虚拟用户,首先下载这个工具。复制代码代码如下:cd /usr/sbin/wget http://www.castaglia.org/proftpd/contrib/ftpasswdchmod +x ftpasswdftpasswd工具的格式如下:复制代码代码如下:# 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

收藏 (0) 打赏

感谢您的支持,我会继续努力的!

打开微信/支付宝扫一扫,即可进行扫码打赏哦,分享从这里开始,精彩与您同在
点赞 (0)

悠久资源 RedHat/Centos CentOS下安装使用FTP服务器端程序ProFTPd的教程 https://www.u-9.cn/system/redhatcentos/79610.html

常见问题

相关文章

发表评论
暂无评论
官方客服团队

为您解决烦忧 - 24小时在线 专业服务