【资料整理】proftpd安装配置
2014-12-24 17:19
399 查看
【资料整理】proftpd安装配置
1)下载安装 wget ftp://ftp.proftpd.org/distrib/source/proftpd-1.3.4c.tar.gz tar zxvf proftpd-1.3.4c.tar.gz cd proftpd-1.3.4c (启用配额模块,限制上传大小,如果重新configure,则需要先make distclean) ./configure --with-modules=mod_quotatab:mod_quotatab_file make make install 默认将安装在/usr/local/sbin 和/usr/local/bin目录下。 2)配置 开机启动: cp contrib/dist/rpm/proftpd.init.d /etc/rc.d/init.d/proftpd vim /etc/init.d/proftpd 找到下列内容: # Make sure the binary is present. [ -x /usr/sbin/proftpd ] || exit 5 更换为: [ -x /usr/local/sbin/proftpd ] || exit 5 增加权限: chmod 755 /etc/init.d/proftpd chkconfig --add proftpd chkconfig proftpd on 增加用户和组: groupadd ftpuser1 useradd ftpuser1 -g ftpuser1 -d /home/ftpuser1 -s /sbin/nologin passwd ftpuser1 增加上传目录: mkdir -p /home/ftpuser1/upload chown ftpuser1:ftpuser1 /home/ftpuser1/upload 检查IPTABLES是否开放FTP端口 修改配置文件: vi /usr/local/etc/proftpd.conf [root@test120 ~]# cat /usr/local/etc/proftpd.conf ServerName "ec-ftp-server" ServerType standalone DefaultServer on Port 21 UseIPv6 off Umask 022 User ftpuser1 Group ftpuser1 DefaultRoot ~/upload AllowOverwrite on #AllowForeignAddress on #AllowRetrieveRestart on #AllowStoreRestart on MaxInstances 30 #MAXConnectionRate 4 #MaxClients 10 "Sorry, the maximum number of clients (%m) are already connected." #MaxClientsPerUser 1 "Sorry, the maximum number of clients (%m) for this user are already connected." #MaxClientsPerHost 1 "Sorry, one client per host, please." #MaxHostsPerUser 1 ServerIdent off USEReverseDNS off IDentLookups off DirFakeUser on DirFakeGroup on DeferWelcome on <IfModule mod_quotatab.c> QuotaEngine on QuotaLog /var/log/quota.log <IfModule mod_quotatab_file.c> QuotaLimitTable file:/usr/local/etc/ftpquota.limittab QuotaTallyTable file:/usr/local/etc/ftpquota.tallytab </IfModule> QuotaDirectoryTally on QuotaDisplayUnits Mb QuotaShowQuotas on QuotaOptions ScanOnLogin </IfModule> SystemLog /var/log/proftpd.log <Limit SITE_CHMOD> DenyAll </Limit> <Limit LOGIN> AllowUser ftpuser1 DenyAll </Limit> <Limit SITE_QUOTA> AllowUser ftpuser1 DenyAll </Limit> <Directory "/home/ftpuser1/upload"> <Limit ALL> DenyAll </Limit> <Limit STOR> AllowUser ftpuser1 DenyAll </Limit> </Directory> 用户上传文件配额设置(限额5GB): ftpquota -create -type=tally -table-path=/usr/local/etc/ftpquota.tallytab ftpquota -create -type=limit -table-path=/usr/local/etc/ftpquota.limittab ftpquota --type=limit --table-path=/usr/local/etc/ftpquota.limittab --add-record --quota-type=user --name=ftpuser1 --units=Gb --bytes-upload=5 启动proftpd: service proftpd start (如果是重新编译模块再安装,则要重启该服务以获得新功能,service proftpd restart) 3. 测试 ftp> open 1.2.3.4 连接到 1.2.3.4。 220 1.2.3.4 FTP server ready 用户(1.2.3.4:(none)): ftpuser1 331 Password required for ftpuser1 密码: 230 User ftpuser1 logged in ftp> quote SITE QUOTA 200-The current quota for this session are [current/limit]: Name: ftpuser1 Quota Type: User Per Session: False Limit Type: Hard Uploaded Mb: 0.00/5120.00 Downloaded Mb: unlimited Transferred Mb: unlimited Uploaded files: unlimited Downloaded files: unlimited Transferred files: unlimited 200 Please contact root@2.3.4.5 if these entries are inaccurate ftp> 任务完成。
相关文章推荐
- 【资料整理】proftpd安装配置
- matlab下libjpeg工具箱(jpegtbx1.4)的安装与配置,包括IJG库的编译配置(综合整理网上资料)
- Ogre SDK 18.1(for VS2010)的安装与环境配置资料整理
- linux资料整理之proftpd服务安装管理
- mysql:环境配置安装<查找资料整理综合>,值得收藏
- 【资料整理】vsftpd安装配置
- 【资料整理】scribe安装配置
- 【资料整理】squid安装和配置代理上网
- ace的安装和配置相关资料整理
- ffmpeg的编译(for x86,for arm)安装及使用(网络资料整理)
- Proftpd 安装配置
- [整理]centos下配置和安装
- Linux下proftpd安装配置
- redis安装和配置_动力节点Java学院整理
- Windows2003 IIS服务器安装及配置学习资料汇总
- Linux下Proftpd的安装配置与管理方法
- CentOS LAMP + Proftpd + SVN 配置安装
- Cacti安装最全配置资料