http://www.sublimation.org/scponly/wiki/index.php/FAQ
Chroot and Debian
Here are instructions to use chrooted scponly on Debian lenny (at the time of writing, scponly is at version 4.6-1.1). You should not have the chrooted user account or his home directory created yet. Let's say you've just installed scponly with "apt-get install scponly". First enable the chrooted version:
# dpkg-reconfigure scponly
Now, to create the new user account (let's call him "upload") and the chroot jail (/home/upload) for him:
# cd /usr/share/doc/scponly/setup_chroot
# gzip -d setup_chroot.sh.gz
# sh setup_chroot.sh
At the time of writing, the setup_chroot.sh script forgets to create /dev/null inside the jail. To fix it:
# mkdir /home/upload/dev
# cp -a /dev/null /home/upload/dev/
That should do it!
If you are using a 64-bit version of Debian, it should be noted that Debian's current setup_chroot script does not copy the necessary loader library from the lib64 directory, as it only accounts for 32-bit operating systems. Assuming your chroot is /home/upload :
# mkdir /home/upload/lib64
# cp /lib64/ld-linux-x86-64.so.2 /home/upload/lib64/
That should do it!
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment