1850475 Members
2879 Online
104054 Solutions
New Discussion

Ls doesn't work from ftp

 
SOLVED
Go to solution
Kris Spander
Advisor

Ls doesn't work from ftp

Hello experts,

I am having a funny problem. If I ftp into my server as a regular user, ls works fine but if I do the same thing as "anonymous" then the ls command fails. Before you say anything, there is an ls under /home/ftp/usr/bin, the permissions are ok, and I can execute /home/ftp/usr/bin/ls from the shell. What could possibly explain this?

TIA, Kris
Dilbert is my hero.
3 REPLIES 3
A. Clay Stephenson
Acclaimed Contributor
Solution

Re: Ls doesn't work from ftp

Hi Kris:

This is easy (I think). Copy /sbin/ls to home/ftp/usr/bin and I think your problem will disappear.

Regards, Clay
If it ain't broke, I can fix that.
A. Clay Stephenson
Acclaimed Contributor

Re: Ls doesn't work from ftp

Hi (again):

I suppose I should explain. When you initiate anonymous ftp it does a chroot() to ftp's home directory. I'll bet you copied /usr/bin/ls and it requires some libraries in /usr to execute. The version is /sbin is statically linked and thus will execute without any other assistance.

If it ain't broke, I can fix that.
Kris Spander
Advisor

Re: Ls doesn't work from ftp

Hi Clay,

Yep, that did it. Thanks for the quick answer. This place rocks!!!

Kris
Dilbert is my hero.