Re: can't ls in vsftpd (chroot)

On 31 Jan 2006 00:12:29 GMT, Unruh <unruh-spam@xxxxxxxxxxxxxx> wrote:

>DC <> writes:
>>I have vsftpd installed on RHEL3.
>>I had to build it from a Fedora Core 4 SRPM as Redhat's one didn't have SSL support.
>>Anyway, I have it installed, and have one username setup.
>>When they log in they are chrooted to a directory that I made for them.
>>Transfers work fine both ways.
>chroot means chroot. NOTHING is available from outside the change root jail
>Thus ls, and all libraries needed by ls MUST be in that chroot jail.
>Eg, your directory is /home/ftp, then you MUST have a /home/ftp/bin
>directory which contains ls, and MUST have a /home/ftp/lib directory which
>contains ALL of the libraries required by ls (or whatever other command you
>might want to use).
>>However, I cannot run ls. Programs like FileZilla hang right after connecting at the "LIST" command.
>>In the chroot directory i made a bin and lib directory.
>>I copied ls into bin, and ran ldd to find what libraries i need.
>>>From a shell i chrooted to the directory and i can run ls with no problem.
>>>From a shell I can su to the ftpuser, cd to the ~ftpuser/bin directory and run ls with no problem.
>>>From FTP,I still cannot run ls. Any ideas?????

I just said that.

in the /home/ftp I created a /bin and /lib.
copied ls into /home/ftp/bin
ran ldd against ls.
copied all the libs it listed into /home/ftp/lib/

Relevant Pages

  • Re: Can a chroot execute programs in the external environment?
    ... >> I know for certain that the GNU toolset supports a biarch system (like ... >> no need for a chroot system at all if you set things up like that. ... Just delete everything but the libraries in the one you don't ...
  • Re: Strange Linker Behavior
    ... To create the chroot, I used ldd to determine each executable's linked ... libraries and rsync'ed them to the chroot location. ... libs) in web servers. ... don't feel like weakening it with shared libs in a web server. ...
  • Re: Make variables to force non default libraries and includes?
    ... but it pulls in libraries from the base system, which differ slightly from those in the source tree. ... I know we do it in 'buildworld' is there a more generic way? ... Basically we buildworld into a directory and then nullfs mount our other sources under it, then we chroot to that "build". ... a separate toolchain directory which can be perturbed by some of our local sources.. ...
  • Re: Running IA32 Firefox on x86_64 without chroot
    ... >> Debian sid system without entering the 32-bit chroot, ... Pango have their own library directories, so without the chroot Firefox ... Firefox, if not those libraries as well; ... directories are going to have to explicitly support it. ...
  • chroot() and dlopen()
    ... Should dlopenbe able to work when chroot() into another directory, ... I'm wondering if the references ... The executable will be dynamically linked with libc and other libraries ...