Chinaunix首页 | 论坛 | 博客
  • 博客访问: 599342
  • 博文数量: 152
  • 博客积分: 2684
  • 博客等级: 少校
  • 技术积分: 1126
  • 用 户 组: 普通用户
  • 注册时间: 2010-10-29 11:03
文章分类
文章存档

2012年(6)

2011年(96)

2010年(50)

分类: Python/Ruby

2011-10-27 09:42:20

本文由wandering_997在论坛所发,CU技术文章整理,供大家参考学习,转载请注明出处,谢谢。
 
1. 安装pure-ftpd
---------------------
 
shell> tar zxvf pure-ftpd-1.0.20.tar.gz
shell> cd zxvf pure-ftpd-1.0.20
shell> ./configure --prefix=/usr/local/pureftpd --with-everything --with-language=simplified-chinese
shell> make
shell> make install
shell> mkdir /usr/local/pureftpd/etc
shell> cp ./configuration-file/pure-ftpd.conf /usr/local/pureftpd/etc
shell> cp ./configuration-file/pure-config.pl /usr/local/pureftpd/sbin
shell> chmod u+x /usr/local/pureftpd/sbin/pure-config.pl
 
 
 
 
2. 建立用户及相关文件
----------------------------
 
shell> cd /usr/local/pureftpd/
shell> pw group add -n ftpgroup -g 2000
shell> pw user add -n ftp -g ftpgroup -s /usr/sbin/nologin
shell> ./bin/pure-pw useradd jack -u 2001 -g ftpgroup -d /data1/it
Password: 
Enter it again: 
shell> ./bin/pure-pw mkdb
 
如果./bin/pure-pw mkdb出错则使用下面语句:
shell> ./bin/pure-pw mkdb /usr/local/pureftpd/etc/pureftpd.pdb -f /usr/local/pureftpd/etc/pureftpd.passwd
 
 
 
 
 
3. 配置pure-ftpd
--------------------
 
shell> vi /usr/local/pureftpd/etc/pure-ftpd.conf
 
ChrootEveryone              no
 
TrustedGID                  0
 
BrokenClientsCompatibility  no
 
PureDB                      /usr/local/pureftpd/etc/pureftpd.pdb
 
AllowUserFXP                yes
 
AllowAnonymousFXP           yes
 
AnonymousCantUpload         yes
 
IPV4Only                    yes
 
 
*这里我只列出了修改过的配置项, 其它的保持不变.*
 
 
 
 
4. 运行pure-ftpd
--------------------
 
shell> echo "/usr/local/pureftpd/sbin/pure-config.pl /usr/local/pureftpd/etc/pure-ftpd.conf" >> /etc/rc.local
shell> /usr/local/pureftpd/sbin/pure-config.pl /usr/local/pureftpd/etc/pure-ftpd.conf
 
 
OK, 可以使用了.
 
 
***注:
我在使用pure-ftpd中感觉它并不能建立一些虚拟目录,虽然它的configure选项中有类似的virtual host和alias,但我没有从网上找到任何可以借鉴的文档和帮助. 在尝试了一段时间后,我就放弃了. 决定不再使用pure-ftpd.
 
我要实现的目标是: 在一个用户的根目录下, 建立一个链接到其它硬盘目录的链接, 并可以对该链接读写. 这种形式类似于gene6中的目录设置.
阅读(1479) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~