On Sat, Aug 22, 2015 at 9:32 AM, Johan Hendriks <[email protected]> wrote:
> Last login: Sat Aug 22 17:05:52 2015 from 192.168.1.13 > Could not chdir to home directory /restricted/testuser1: No such file or > directory > Cannot read termcap database; > using dumb terminal settings. > % > From here I can do ls and so on if I copy ls, mkdir and other programs > from /rescue to /restricted/username/bin , and can not escape my home, > this is what I want but the error messages are frustrating. > You have the chroot directory both as a chroot directory and a home directory. This means that the *actual* home directory, as seen from outside the chroot, is /restricted/testuser1/restricted/testuser1. (Home directory is *inside* the chroot directory and therefore relative to it.) The termcap message should be self-explanatory; you're missing /etc/termcap inside the chroot. chroot is what it says on the tin: once set, the specified directory is "/". Every file accessed from that point on MUST be available from a tree in which the specified chroot directory is "/". This includes symlinks --- symlink resolution doesn't get to see outside the specified "/" any more than anything else running in the chroot does, so you cannot simply symlink to a file outside the chroot. (Hard links are fine, since they are actually by inode number; they just have to be on the same partition.) -- brandon s allbery kf8nh sine nomine associates [email protected] [email protected] unix, openafs, kerberos, infrastructure, xmonad http://sinenomine.net _______________________________________________ [email protected] mailing list https://lists.freebsd.org/mailman/listinfo/freebsd-stable To unsubscribe, send any mail to "[email protected]"
