LoginSignup
0
2

More than 5 years have passed since last update.

Raspberry Piにvsftpd 3.0.3をソースからインストール

Posted at

Raspberry Piのvftp 2.3.5ではchrootがうまく設定できないのでソースからビルドしたその記録。

ソースファイルを取得し、展開、そのディレクトリへ移動

# wget https://security.appspot.com/downloads/vsftpd-3.0.3.tar.gz
# tar zxfv vsftpd-3.0.3.tar.gz 
# cd vsftpd-3.0.3/

cryptに対するエラーを回避する

このままmakeすると下記エラーメッセージを表示し、ビルが失敗する。

sysdeputil.c:(.text+0xe0): `crypt' に対する定義されていない参照です
sysdeputil.c:(.text+0x100): `crypt' に対する定義されていない参照です

そこでvsf_findlbs.shにlibcryptの所在を記す。

# vim vsf_findlibs.sh

29行目に下記を追加

   locate_library /usr/lib/arm-linux-gnueabihf/libcrypt.so && echo "-lcrypt";

make

vsf_findlbs.shを保存終了後、makeし、インストールする。

make
make install

chrootの設定

chrootできるように設定ファイルを編集。

vim /etc/vsftpd.conf
chroot_local_user=YES
chroot_list_enable=YES
chroot_list_file=/etc/vsftpd.chroot_list
allow_writeable_chroot=YES

vsftpdサーバを起動する。

/usr/local/sbin/vsftpd &
0
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
0
2