手机版
你好,游客 登录 注册
背景:
阅读新闻

Ubuntu安装搭建ProFTPd服务器

[日期:2012-12-30] 来源:Linux社区  作者:zinss26914 [字体:大 中 小]

引言

工作需要前端工程师在测试环境测试,但是前端工程师大多不用Linux,调试起来我这种兼职运维的就是一个苦逼了,因此在Ubuntu下搭建一个FTP服务器方便前端工程师部署调试自己的代码。

搭建ProFTPd服务器

安装ProFTPd

sudo apt-get install proftpd

配置ProFTPd

vim /etc/proftpd/proftpd.conf

# This is a basic ProFTPD configuration file (rename it to
# 'proftpd.conf' for actual use.  It establishes a single server
# and a single anonymous login.  It assumes that you have a user/group
# "nobody" and "ftp" for normal operation and anon.

ServerName   "HAO GEEK TEAM"
ServerIdent    on "Welcome To Hao Geek!"
ServerType   standalone
DefaultAddress   192.168.1.***
SocketBindTight   on

# Port 21 is the standard FTP port.
Port    21

# Umask 022 is a good standard umask to prevent new dirs and files
# from being group and world writable.
Umask    022

# To prevent DoS attacks, set the maximum number of child processes
# to 30.  If you need to allow more than 30 concurrent connections
# at once, simply increase this value.  Note that this ONLY works
# in standalone mode, in inetd mode you should use an inetd server
# that allows you to limit maximum number of processes per service
# (such as xinetd).
MaxInstances   30

# Set the user and group under which the server will run.
User    www-data
Group    www-data

# To cause every FTP user to be "jailed" (chrooted) into their home
# directory, uncomment this line.
DefaultRoot /srv/www/test/
AllowOverwrite  yes

# Normally, we want files to be overwriteable.
<Directory /srv/www/test/test1>
<Limit WRITE>
AllowUser wangzhengyi
DenyAll
</Limit>
</Directory>

# 设置客户端认证方式,通过文件认证http://www.linuxidc.com
AuthOrder                              mod_auth_file.c mod_auth_unix.c
# 指定文件认证的passwd文件
AuthUserFile  /etc/proftpd/ftp.passwd
# 指定文件认证的group文件
AuthGroupFile  /etc/proftpd/ftp.group
# 认证帐号不需要有有效的shell
RequireValidShell    off
# 设置每秒接受的连接请求个数,防止DoS攻击
MaxConnectionRate      5
# 最大的连接上的client的数量
MaxClients  20 "Sorry,the maximum number of allowed users (%m) are already connected. "
# 允许端点续传
AllowStoreRestart  on
#关闭dns反向解析
UseReverseDNS off
IdentLookups off

ftpasswd创建访问用户

sudo ftpasswd --passwd --file=/etc/proftpd/ftp.passwd --name=wangzhengyi --uid=33 --shell=/bin/false --home=/home/nohome

每个参数的定义可以man一下,动动脑子想想自己的需求还是很必要的!

重启proftpd服务器

sudo  /etc/init.d/proftpd  restart

linux
相关资讯       proftpd  Ubuntu服务器  ProFTPd安装 
本文评论   查看全部评论 (0)
表情: 表情 姓名: 字数

       

评论声明
  • 尊重网上道德,遵守中华人民共和国的各项有关法律法规
  • 承担一切因您的行为而直接或间接导致的民事或刑事法律责任
  • 本站管理人员有权保留或删除其管辖留言中的任意内容
  • 本站有权在网站内转载或引用您的评论
  • 参与本评论即表明您已经阅读并接受上述条款