wandering_997
在FreeBSD下安装PURE-FTPD [原创] (抛砖引玉,献丑了)
在FreeBSD下安装PURE-FTPD [原创]
作者: wandering E-mail: [email]wandering_997@yahoo.com[/email]
原链接: [url]http://wandering997.yculblog.com/post.1063821.html[/url]
[url]http://www.pureftpd.org[/url]
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
[[i] 本帖最后由 wandering_997 于 2006-1-16 11:50 编辑 [/i]]
wolfg
[quote]原帖由 [i]wandering_997[/i] 于 2006-1-16 11:49 发表
在FreeBSD下安装PURE-FTPD [原创]
我要实现的目标是: 在一个用户的根目录下, 建立一个链接到其它硬盘目录的链接, 并可以对该链接读写. 这种形式类似于gene6中的目录设置.[/quote]
试试mount --bind otherdir userdir
zimac
[quote]原帖由 [i]wolfg[/i] 于 2006-1-18 16:27 发表 [url=http://bbs.chinaunix.net/redirect.php?goto=findpost&pid=4665400&ptid=689943][img]http://bbs.chinaunix.net/images/common/back.gif[/img][/url]
试试mount --bind otherdir userdir [/quote]
就目前而言, Linux下的ftp软件,还只有pureftpd可以实现上述功能: 在编译的时候,带上参数--with-diraliases !