免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 5390 | 回复: 6
打印 上一主题 下一主题

[FTP] 在FreeBSD下安装PURE-FTPD [原创] (抛砖引玉,献丑了) [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2006-01-16 11:49 |只看该作者 |倒序浏览
在FreeBSD下安装PURE-FTPD [原创]

作者: wandering   E-mail: wandering_997@yahoo.com

原链接: http://wandering997.yculblog.com/post.1063821.html

http://www.pureftpd.org


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: <new password>
Enter it again: <new password>
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中的目录设置.



Created by wandering 2006/01/09 15:44

[ 本帖最后由 wandering_997 于 2006-1-16 11:50 编辑 ]

论坛徽章:
0
2 [报告]
发表于 2006-01-18 16:27 |只看该作者
原帖由 wandering_997 于 2006-1-16 11:49 发表
在FreeBSD下安装PURE-FTPD [原创]

我要实现的目标是: 在一个用户的根目录下, 建立一个链接到其它硬盘目录的链接, 并可以对该链接读写. 这种形式类似于gene6中的目录设置.


试试mount --bind otherdir userdir

论坛徽章:
0
3 [报告]
发表于 2006-01-20 13:52 |只看该作者

回复 2楼 wolfg 的帖子

我试了一下,freebsd下mount没有--bind参数啊? Linux到是有。
我用的是FreeBSD 6.0

论坛徽章:
0
4 [报告]
发表于 2006-01-20 17:44 |只看该作者
试试有没有这个命令 mount_null

http://www.castaglia.org/proftpd ... i-HOWTO-Chroot.html

论坛徽章:
0
5 [报告]
发表于 2006-01-23 16:05 |只看该作者

回复 4楼 wolfg 的帖子

谢谢,搞定!

论坛徽章:
0
6 [报告]
发表于 2006-01-25 17:24 |只看该作者
studing

论坛徽章:
0
7 [报告]
发表于 2008-01-27 06:30 |只看该作者
原帖由 wolfg 于 2006-1-18 16:27 发表


试试mount --bind otherdir userdir


就目前而言, Linux下的ftp软件,还只有pureftpd可以实现上述功能: 在编译的时候,带上参数--with-diraliases !
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP