この機能を有効にするにはvsftpdでは、chrootを利用します。

例えば、hogehogeユーザがアクセスした場合は、/home/hogehogeディレクトリが/(ルート)になり、

/etcディレクトリなどは見えなくなります。

#vi /etc/vsftpd/vsftpd.conf
94行目付近に以下の行を追加する。
----------下記抜粋----------
# You may specify an explicit list of local users to chroot() to their home
# directory. If chroot_local_user is YES, then this list becomes a list of
# users to NOT chroot().
chroot_local_user=YES
#chroot_list_enable=YES
# (default follows)
#chroot_list_file=/etc/vsftpd.chroot_list
----------下記抜粋----------

変更が完了したら、設定を保存してエディタを終了します。

次に設定を有効にするためvsftpdを再起動します。

#/etc/init.d/vsftpd restart

これで、ホームディレクトより上は閲覧できなくなります。

最終更新:2008年08月19日 09:22