LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices

Reply
 
Search this Thread
Old 09-18-2002, 11:09 AM   #1
bock
LQ Newbie
 
Registered: May 2002
Location: sacramento
Distribution: Bock Hat 7.2
Posts: 11

Rep: Reputation: 0
Question 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
 
Old 09-18-2002, 01:11 PM   #2
markus1982
Senior Member
 
Registered: Aug 2002
Location: Stuttgart (Germany)
Distribution: Debian/GNU Linux
Posts: 1,467

Rep: Reputation: 46
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
 
Old 09-18-2002, 01:47 PM   #3
bock
LQ Newbie
 
Registered: May 2002
Location: sacramento
Distribution: Bock Hat 7.2
Posts: 11

Original Poster
Rep: Reputation: 0
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
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
remote command execute telnet with 1 command MPowers Linux - Networking 2 06-30-2005 06:31 AM
chroot ftp twantrd Solaris / OpenSolaris 2 12-12-2004 02:07 AM
Using FTP to execute command line commands remotely steve_2010 Solaris / OpenSolaris 4 02-13-2004 08:44 AM
I want to set up a Website and chroot the users ftp davidsch Linux - Newbie 2 11-10-2003 11:59 AM
Chroot (FTP,Home Directory) Thanewbie Linux - Security 2 05-14-2001 02:49 AM


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

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration