I am runnning RedHat 6.0 but I have upgraded wu-ftpd to 2.6.0-1. I have set up a guest account. To troubleshoot problems with ls -l I moved the ~guest/bin/ls to ~guest/bin/ls_bak. If, from the console, I do a "chroot ~guest ls" I get "cannot execute ls: no such file or directory". Yet from the client if I do an ls of the same directory I get a listing of the contents that can be retrieved through "mget". But I know the chroot is occuring because I am unable to back out of the guest user's home directory.
#more ~guest/etc/passwd root:*:0:0::: bin:*:1:1::: operator:*:11:0::: nobody:*:99:99::: guest:*:500:500::/home/guest/./:/bin/true #more ~guest/etc/group root::0: bin::1: daemon::2: sys::3: adm::4: guest:x:500: #more shells /bin/bash /bin/sh /bin/ash /bin/bsh /bin/tcsh /bin/csh /bin/true #more /etc/passwd guest:x:500:500::/home/guest/./:/bin/true #more /etc/group guest:x:500: #ls -l ~guest total 8112 d--x--x--x 2 root root 1024 Mar 17 16:51 bin -rw-rw-rw- 1 guest guest 1654 Jan 18 16:24 boot.log -rw-rw-rw- 1 guest guest 2699 Feb 21 08:57 dmesg d--x--x--x 2 root root 1024 Feb 23 15:17 etc drwxrwxrwx 2 guest guest 1024 Mar 16 15:10 incoming dr--r--r-- 3 root root 3072 Mar 13 16:33 lib drwxr-x--- 2 guest guest 1024 Feb 28 14:23 outgoing -rw-r--r-- 1 guest guest 6453292 Mar 16 11:50 phillips.zip drwxrwxrwx 4 root ftp 1024 Feb 21 08:21 pub # ls -l ~guest/bin total 343 ---x--x--x 1 root root 15204 Mar 21 1999 compress ---x--x--x 1 root root 52388 Mar 21 1999 cpio ---x--x--x 1 root root 50384 Mar 21 1999 gzip -rwxr-xr-x 1 root root 50148 Mar 2 11:19 ls_bak ---x--x--x 1 root root 62660 Mar 21 1999 sh ---x--x--x 1 root root 110668 Mar 21 1999 tar lrwxrwxrwx 1 root root 4 Jan 18 14:54 zcat -> gzip # chroot ~guest ls chroot: cannot execute ls: No such file or directory NOW FROM CLIENT 230 User guest logged in. Access restrictions apply. ftp> ls 200 PORT command successful. 150 Opening ASCII mode data connection for file list. boot.log dmesg phillips.zip ug15_step203_rs.tar.Z 226 Transfer complete. 54 bytes received in 0.15 seconds (0.36 Kbytes/sec) ftp> ls -l 200 PORT command successful. 150 Opening ASCII mode data connection for /bin/ls. 226 Transfer complete.
Starting with version 2.6.0, wu-ftpd (optionally) implements ls internally, so you don't need the ls command in the chroot structure anymore. If you don't like this behavior, recompile wu-ftpd with ./configure --disable-ls