PCZONE 討論區

PCZONE 討論區 (https://www.pczone.com.tw/vbb3/)
-   -- FreeBSD & Linux 討 論 版 (https://www.pczone.com.tw/vbb3/forum/41/)
-   -   Wu-FTP的疑問--Real or Guest? (https://www.pczone.com.tw/vbb3/thread/41/62954/)

Rico0123 2002-10-30 04:32 PM

Wu-FTP的疑問--Real or Guest?
 
最近練習Wu-FTP時發現:只要是指名系統內已有的帳號為Guest(guestuser or guestgroup),這些登入的人就看不到資料夾內的任何檔案了(使用瀏覽器),上傳上來的檔案,經過"重新整理"也會不見!!(但實際上已傳至Server上的資料夾中),若取消Guestuser(或Guestgroup),這些帳號就可以正常看到檔案了,但這樣一來安全性就大打折扣了(因為是real了,我可不想他們在其他資料夾亂跑!)是不是ftpaccess哪裡的參數設錯了呢?:circle:

Rico0123 2002-11-03 10:42 PM

我已經自己找到答案了!原來是沒有建立與拷貝/bin裡頭該用到的檔案至Guest的預設目錄下(如ls,沒有他,對方當然看不到檔案了!因為根本"列"不出來∼)!由於很多教學文章甚至書籍都沒有提到這件事,請大家留意囉!:jump:

repsol 2002-11-05 02:28 PM

原廠的文件 , 可以參考參考喔
[url]http://www.wu-ftpd.org/HOWTO/guest.HOWTO[/url]


4. Build the contents of the ~/bin directory.


NOTE WELL: if you cannot see the directory contents after you login
as the guest user, the 'ls' program that you installed is not working.
If you use an 'ls' linked for dynamic libraries, and you do not have
the required libraries and/or devices installed properly in the guest
tree, 'ls' will not work and you will not see the contents of the
guest directory.

This is the single most FAQ on the wu-ftpd list. Repeating: if you
cannot see the contents of the directory, your installed 'ls' is not
working. The proper installation procedures for 'ls' vary by operating
system. There are some OS specific notes at the bottom of this howto
that may be of help.

Another problem that has been reported is that the chroot() directory
given in your /etc/passwd file for the guest account must be to the
directory where your ~/bin directory is located. That is, if your
chroot directory is /u01/ftp/ftptest/ and your /etc/passwd account is

yourftp:x:42:42:guest ftp account:/u01/ftp/./ftptest:/etc/ftponly

it will not work, as the ~/bin directory is not under the chroot()ed
directory. It must be set as follows.

yourftp:x:42:42:guest ftp account:/u01/ftp/ftptest/./:/etc/ftponly

There are additional resources to help if you still cannot see files
after an FTP login. See the FAQ and resource center at
[url]http://www.wuftpd.org/[/url] for more information.

USE STATIC LINKED COPIES OF ALL UTILITIES IF POSSIBLE.

You may get the source to build your own static 'ls' by downloading the
GNU fileutils source package from <[url]ftp://ftp.gnu.org/pub/gnu/[/url]>.


cp /.../bin/ls bin
chown root.bin bin/ls
chmod 111 bin/ls

Optional for on the fly compression and tar:

cp /.../bin/gzip bin
cp /.../bin/tar bin
chown root.bin bin/gzip
chown root.bin bin/tar
chmod 111 bin/gzip
chmod 111 bin/tar


If the utilities are not static, create the necessary devices in ~/dev and
copy the necessary libraries into ~/lib. Check the man page for ftpd that
comes with your system; it may be of help.

REGARDING HARD AND SOFT/SYMBOLIC LINKS:

The chroot() obviates the use of soft links in this case. However, it
it is possible to make these hard links back to the master copy of the
utilities rather than copies. This can save some disk space if that is
a concern.

Rico0123 2002-11-06 11:33 AM

感謝喔~~~!


所有時間均為 +8。現在的時間是 08:21 PM



 XML   RSS 2.0   RSS 
本站使用 vBulletin 合法版權程式
站務信箱 : [email protected]

本論壇所有文章僅代表留言者個人意見,並不代表本站之立場,討論區以「即時留言」方式運作,故無法完全監察所有即時留言,若您發現文章可能有異議,請 email :[email protected] 處理。