【资料整理】proftpd安装配置
来源:互联网 发布:会计软件 免费 编辑:程序博客网 时间:2024/05/18 12:33
【资料整理】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相似文章推荐:向大学说拜拜——大学 > 兴趣 + 时间 + 思考 + 实践
【人物素描】
大学期间,担任过班委,加入过学生会,参加过社团,拿过奖学金......而印象最深刻的莫过于参加并组织过ACM集训,以及参加过导师的国家自然科学基金项目了。毕业时顺利拿到一波offer,并在腾讯SNG-PC客户端开发工程师岗和百度大数据部-机器
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
QuotaDirectoryTally on
QuotaDisplayUnits Mb
QuotaShowQuotas on
QuotaOptions ScanOnLogin
SystemLog /var/log/proftpd.log
</limit site_chmod>
DenyAll
</limit login>
AllowUser ftpuser1
DenyAll
</limit site_quota>
AllowUser ftpuser1
DenyAll
</directory ">
</limit all>
DenyAll
</limit stor>
AllowUser ftpuser1
DenyAll
用户上传文件配额设置(限额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安装配置
- proFTPD的安装配置
- 安装配置proftpd
- proftpd安装配置
- 系统安装配置资料整理
- CentOs中安装配置proftpd
- Linux下proftpd安装配置
- centos6.4安装配置proftpd
- 安装配置一个proftpd的实例
- Proftpd+Ldap的安装配置(一)
- CENTOS下快速安装配置proftpd
- Kali Linux下安装配置ProFTPD实例
- Linux下Proftpd安装与配置
- Proftpd安装。
- proftpd 安装
- proftpd安装
- ace的安装和配置相关资料整理
- mysql:环境配置安装<查找资料整理综合>,值得收藏
- 使用T4模板动态生成邮件内容并储存到任意位置
- 设计模式--代理模式
- 0-1背包问题
- 按两下退出登录
- MAC查看硬盘使用情况工具ncdu
- 【资料整理】proftpd安装配置
- 1059. C语言竞赛(20)
- Oracle学习笔记
- iOS开发之Xcode常用调试(Debug)技巧总结
- 修改window本地hosts文件,修改域名指向
- 动态规划算法
- tomcat CXF
- 三天上手PHP之9:数组(array)
- 第九周—第几天