Subject: Re: chroot()

From: "Stefan Berg" <[email-masked]>
Date: Thu, 24 Oct 1996 14:51:16 +0100

<fixed>

I found the truss command very helpful for debugging - example:

prompt> <larger><larger>truss -f chroot ~ftp /bin/ls

Try it and see what you get.

/Stefan

</larger></larger>
> I did all that.. (I did read the faq and the doc). He's part of a 

> group which is part of the guestgroup in the ftpaccess file. I set 

> his shell to /bin/csh (defined in the /etc/shells), he gets 

> "Can't create data socket (0.0.0.0,20): Bad file number." when he types 

> ls after logging in via ftp. 

> however, when I set his shell to /bin/false (defined in the /etc/

> shells) he can login but the chroot() doesn't seem to work since the 

> root dir is wrong. 

> Any help would be appreciated.

---

From: Emil Isberg <[email-masked]>
Date: Thu, 24 Oct 1996 15:06:34 +0200 (MET DST)

> </larger></larger>

Another useful command is ldd ( I think it is the same on most platforms)
.. when you need to find wich files you need to have in the ~ftp/usr/lib
just do 'ldd ~ftp/bin/ls' and try to copy all the needed files to
~ftp/usr/lib ..
The ~ftp/dev/ is much harder to set up if you don't know what you do, but
on my server (SunOS boromir 5.5 Generic sun4c sparc SUNW,Sun_4_50) I got:
ls -l ~ftp/dev
total 0
crw-r--r--   1 root     other     11, 42 Aug 19 10:30 tcp
crw-r--r--   1 root     other    105,  1 Aug 19 10:30 ticotsord
crw-r--r--   1 root     other     11, 41 Aug 19 10:30 udp
crw-r--r--   1 root     other     13, 12 Aug 19 10:30 zero

and that works fine ..

/Emil