我的匿名 ftp 服务器出现什么错误?上传有效,读取无效

我的匿名 ftp 服务器出现什么错误?上传有效,读取无效

我想创建一个匿名 ftp。用户只能从 pub 目录上传和读取。操作系统是Unixware 71,ftp服务器是WU-FTPD。这是 ftpaccess 文件

#ident  "@(#)unixsrc:usr/src/common/cmd/cmd-inet/usr.sbin/in.ftpd/ftpaccess /main/1"
#
# ftpd configuration file, see ftpaccess(4tcp).
#
loginfails      3
passwd-check    trivial         warn
class           all             anonymous,guest,real    *
compress        yes             all
tar             yes             all
readme          README*         login   all
readme          README*         cwd=*   all

#banner         /var/ftp/banner.msg
#message        /var/ftp/welcome.msg    login   all
#message        .message                cwd=*   all

#chmod          no              anonymous
delete          yes             anonymous,guest
#overwrite      no              anonymous,guest
#rename         no              anonymous,guest
#umask          no              anonymous

#limit          all      5      Wk0900-1800             /var/ftp/toomany.msg
#limit          all     20      SaSu|Any1800-0900       /var/ftp/toomany.msg

log             commands        anonymous,guest,real
log             transfers       anonymous,guest,real    inbound,outbound

#path-filter    anonymous,guest /var/ftp/filename.msg   ^[[:alnum:]-._]*$ ^[.-]

#upload         /home/ftp       *               no nodirs
#upload         /home/ftp       /pub/incoming   yes ftp other 0444 nodirs
upload          /home/ftp       /pub            yes ftp other 0755

这是具有 home/ftp 权限和所有者的目录

  1737    0 dr-xr-xr-x   5 root     root           96 Mar 29 03:44 /home/ftp/
 41212    0 d--x--x--x   2 root     root           96 Mar 29 03:19 /home/ftp/bin
 41215   20 ---x--x--x   1 root     sys         19904 Mar 29 03:19 /home/ftp/bin/ls
 41214    0 d--x--x--x   2 root     root           96 Mar 29 03:39 /home/ftp/etc
 41216    2 -r--r--r--   1 root     sys            33 Mar 29 03:36 /home/ftp/etc/passwd
 41217    2 -r--r--r--   1 root     sys            10 Mar 29 03:39 /home/ftp/etc/group
 41219    0 drwxrwxrwt   2 root     sys            96 Mar 29 03:44 /home/ftp/pub
 41218    2 -rwxr-xr-x   1 ftp      other         389 Mar 29 03:44 /home/ftp/pub/cast

服务器正常工作,我可以以匿名方式将文件“cast”上传到服务器上。但正如您所看到的,无法读取(如果您知道文件名,则可以获取)

ftp -n 192.168.0.133
Connected to 192.168.0.133 (192.168.0.133).
220 unixware1 FTP server (Version wu-2.6.2(2) Wed Dec 21 20:49:51 EST 2005) ready.
ftp> user anonymous
331 Guest login ok, send your complete e-mail address as password.
Password: 
230 Guest login ok, access restrictions apply.
ftp> cd pub
250 CWD command successful.
ftp> ls
227 Entering Passive Mode (192,168,0,133,245,145)
150 Opening ASCII mode data connection for /bin/ls.
226 Transfer complete.
ftp> put cast
local: cast remote: cast
227 Entering Passive Mode (192,168,0,133,156,60)
150 Opening ASCII mode data connection for cast.
226 Transfer complete.
390 bytes sent in 2,5e-05 secs (15600,00 Kbytes/sec)
ftp> ls
227 Entering Passive Mode (192,168,0,133,209,31)
150 Opening ASCII mode data connection for /bin/ls.
226 Transfer complete.
ftp> ls cast
227 Entering Passive Mode (192,168,0,133,95,177)
150 Opening ASCII mode data connection for /bin/ls.
226 Transfer complete.
ftp> 

答案1

找到解决方案在其他论坛上 我必须在 chroot ftp 中复制共享库。

mkdir -p /home/ftp/usr/lib
cp /usr/lib/libc.so.1 /home/ftp/usr/lib

相关内容