LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   wu-ftp help with chroot - ls command does not execute (https://www.linuxquestions.org/questions/linux-software-2/wu-ftp-help-with-chroot-ls-command-does-not-execute-30648/)

bock 09-18-2002 11:09 AM

wu-ftp help with chroot - ls command does not execute
 
not sure what is wrong with the FTP setup. Here are some details:

RH7.2
wu-ftp Version wu-2.6.1-18

Referened http://www.wu-ftpd.org/HOWTO/guest.HOWTO & http://www.redhat.com/support/resour.../guestftp.html when setting up the service.

I am able to login fine. Updated the .messages file to verify the correct ftpaccess was being used.

The problem is with the ls command (haven't tested all of the commands), it just hangs and the prompt does not come back. I have to ^Z out of it and kill the process because I am unable to get commands to work.
- the ?, cd, and pwd commands work
- dir and ls do not work
- checked the ls command from telnet, and it works correctly

############start snipit###########
// ftp'ing from different host
/home/bock>ftp myhost.com
Connected to myhost.com.
220 myhost.com FTP server (Version wu-2.6.1-18) ready.
Name (myhost.com:bock): bock
331 Password required for bock.
Password:
230-Hello there ftp guy.
230-
230-
230 User bock logged in.
Remote system type is UNIX.
Using binary mode to transfer files.
ftp> pwd
257 "/home/bock" is current directory.
ftp> cd intel
250 CWD command successful.
ftp> ls
ls
exit
ò
Suspended
############end snipit###########

searched the wu-ftp & linuxquestions forums and did not find anything.

Any ideas?


-bock
:jawa:

markus1982 09-18-2002 01:11 PM

do you have a bin and lib directory? in the bin directory of the chrooted location there should be ls, so for /example-root
this would be:

/example-root/bin/ls
/example-root/lib/libtermcap.so.2
/example-root/lib/libc.so.6
/example-root/lib/ld-linux.so.2

and since ls requires some shared libs ... which ones it requires can be found out by doing a
Code:

ldd /bin/ls

bock 09-18-2002 01:47 PM

Yep, there is a bin and lib dir.


================================
[root@myhost ftpguest]# ls -la *
bin:
total 336
dr-xr-xr-x 2 root root 4096 Sep 7 12:19 .
drwxr-x--- 7 ftpguest ftpguest 4096 Sep 17 18:05 ..
-r-xr-xr-x 1 root root 313 Sep 7 12:19 bin.md5
-r-xr-xr-x 1 root root 17276 Sep 7 12:19 compress
-r-xr-xr-x 1 root root 48796 Sep 7 12:17 cpio
-r-xr-xr-x 1 root root 51228 Sep 7 12:17 gzip
-r-xr-xr-x 1 root root 45948 Sep 7 12:17 ls
-r-xr-xr-x 1 root root 150796 Sep 7 12:17 tar
lrwxrwxrwx 1 root root 4 Sep 17 17:14 zcat -> gzip

etc:
total 20
dr-xr-xr-x 2 root root 4096 Sep 17 17:26 .
drwxr-x--- 7 ftpguest ftpguest 4096 Sep 17 18:05 ..
-r--r--r-- 1 root root 60 Sep 17 17:20 group
-r--r--r-- 1 root root 409 Sep 7 12:17 ld.so.cache
-r--r--r-- 1 root root 0 Sep 7 12:17 ld.so.conf
-r--r--r-- 1 root root 112 Sep 17 17:19 passwd

lib:
total 2456
dr-xr-xr-x 2 root root 4096 Sep 7 12:17 .
drwxr-x--- 7 ftpguest ftpguest 4096 Sep 17 18:05 ..
-r-xr-xr-x 1 root root 485171 Sep 7 12:17 ld-2.2.4.so
lrwxrwxrwx 1 root root 11 Sep 17 17:14 ld-linux.so.2 -> ld-2.2.4.so
-r-xr-xr-x 1 root root 1282588 Sep 7 12:17 libc-2.2.4.so
lrwxrwxrwx 1 root root 13 Sep 17 17:14 libc.so.6 -> libc-2.2.4.so
-r-xr-xr-x 1 root root 436784 Sep 7 12:17 libnsl-2.2.4.so
lrwxrwxrwx 1 root root 15 Sep 17 17:14 libnsl.so.1 -> libnsl-2.2.4.so
-r-xr-xr-x 1 root root 261460 Sep 7 12:17 libnss_files-2.2.4.so
lrwxrwxrwx 1 root root 21 Sep 17 17:14 libnss_files.so.2 -> libnss_files-2.2.4.so
-r-xr-xr-x 1 root root 260 Sep 7 12:17 libs.md5
lrwxrwxrwx 1 root root 19 Sep 17 17:14 libtermcap.so.2 -> libtermcap.so.2.0.8
-r-xr-xr-x 1 root root 11832 Sep 7 12:17 libtermcap.so.2.0.8

======================


check on libs required by ls:
======================

[root@myhost lib]# ldd /bin/ls
libtermcap.so.2 => /lib/libtermcap.so.2 (0x40033000)
libc.so.6 => /lib/i686/libc.so.6 (0x40037000)
/lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x40000000)


Those are all covered in the ~ftpguest/lib dir unless the link for libc.s0.6 isn't good enough. BTW, the lib in i686 is also a link: libc.so.6 -> libc-2.2.4.so

-bock


All times are GMT -5. The time now is 06:03 PM.