蓝森林首页 | 返回主页 | 本站地图 | 站内搜索 | 联系信箱 | -->
 您目前的位置:首页 > 自由软件 > 技术交流 > 应用编程 -->


    

蓝森林 http://www.lslnet.com 2006年8月16日 14:08

BSD作为FTP的时候如何隐藏绝对路径呢?

比如说用户FTP进去就在/usr/local/apache/htdocs/chinaunix/这个目录下,如何让这个用户在FTP进去了之后看到的是“/”,而把这个地方当作根路径呢?应该做些什么修改呢?我的系统是FreeBSD4.7。

还有如何让这个用户FTP进去了之后不能删除文件呢?即使是自己传上去的也不能删除!!!

请问如何实现这些功能呢?


Re: BSD作为FTP的时候如何隐藏绝对路径呢?

1. Put the user in /etc/ftpchroot, then change the user's home directory to /usr/local/apache/htdocs/chinaunix.

2. The default ftpd came with FreeBSD does not support this function (I think). However, with FreeBSD 4.7, another ftp server, lukemftpd, was added. With lukemftpd, you should be able to do this. Take a look at lukemftpd(8) and ftpd.conf(5), and pay attention to "modify" in ftpd.conf(5).

Beware that if you do not allow the user to delete the uploaded files, they can't update it either.

chroot

  用chroot技术可以很方便的解决你的第一个问题,proftpd应该可以解决你的第二个问题。

  还有楼下的朋友的方案我想应该也是很不错的,具体方案还是您自己选择吧。



Copyright © 1999-2000 LSLNET.COM. All rights reserved. 蓝森林网站 版权所有。 E-mail : webmaster@lslnet.com