LoginSignup
3
2

More than 5 years have passed since last update.

Linux 上で5秒で chroot jail を使えるコマンド「jailing」を使ってみた

Last updated at Posted at 2015-05-13

参考

動作確認

git clone https://github.com/kazuho/jailing.git
mkdir aa
sudo ./jailing --root=`pwd`/aa -- python -m http.server

http://ipaddr:8000/ にアクセスができることを確認。

動かないプログラムの場合の調査方法

bftpdをインストール
pacman -Sy bftpd
pacman -Ql bftpd | grep -v \/$
sudo cp /etc/bftpd.conf aa/etc/
mkdir -p aa/var/run/bftpd
mkdir -p aa/srv/ftp

straceを使う。

sudo ./jailing --root=`pwd`/aa -- strace bftpd

getpeername(2, 0x611ae0, [16]) = -1 ENOTSOCK (Socket operation on non-socket)

とあるので、Configuring ProFTPD - FAQを参考。

aa/etc/bftpd.conf
- BIND_TO_ADDR="any"
+ BIND_TO_ADDR="192.168.0.3"

以下途中

3
2
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
3
2