LoginSignup
2
3

More than 5 years have passed since last update.

FTPで特定のユーザに上位ディレクトリを見せないための設定

Last updated at Posted at 2016-09-15

たとえば
user01が存在し、ホームディレクトリが
/home/user01
だとする。
FTP接続時のrootはuser01にしたい。
つまり、user01によるFTP操作は、ディレクトリuser01にのみ実施可能であり、
その他のディレクトリ(上位ディレクトリ)にはアクセスさせたくない場合。

vsftpd.conf に下記を追記する。そして vsftpdを再起動する。

#anonymous_enable=YES
anonymous_enable=NO
chroot_local_user=YES
allow_writeable_chroot=YES

なお、

allow_writeable_chroot=YES

が抜けていると、下記のエラーが出て接続できないので注意。

vsftpd: refusing to run with writable root inside chroot()
2
3
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
2
3