# centos7 の場合
default の設定のまま動かすと、
MacBook $ ftp 192.168.56.5
Connected to 192.168.56.5.
220 (vsFTPd 3.0.2)
Name (192.168.56.5:kenji): kenji
331 Please specify the password.
Password:
230 Login successful.
Remote system type is UNIX.
Using binary mode to transfer files.
ftp>
ftp> pwd
Remote directory: /home/kenji
ftp>
ftp> dir
229 Entering Extended Passive Mode (|||37071|).
150 Here comes the directory listing.
-rw-rw-r-- 1 1000 1000 0 Dec 22 16:49 ftp-test.txt
226 Directory send OK.
ftp>
ftp> cd ..
250 Directory successfully changed.
ftp> dir
229 Entering Extended Passive Mode (|||40630|).
150 Here comes the directory listing.
drwx------ 3 1000 1000 4096 Dec 29 15:18 kenji
226 Directory send OK.
ftp> cd ..
250 Directory successfully changed.
ftp> dir
229 Entering Extended Passive Mode (|||6709|).
150 Here comes the directory listing.
lrwxrwxrwx 1 0 0 7 Dec 20 03:53 bin -> usr/bin
dr-xr-xr-x 4 0 0 4096 Dec 20 04:00 boot
drwxr-xr-x 19 0 0 2960 Dec 29 13:55 dev
drwxr-xr-x 78 0 0 8192 Dec 29 15:36 etc
drwxr-xr-x 3 0 0 18 Dec 22 10:21 home
lrwxrwxrwx 1 0 0 7 Dec 20 03:53 lib -> usr/lib
lrwxrwxrwx 1 0 0 9 Dec 20 03:53 lib64 -> usr/lib64
drwxr-xr-x 2 0 0 6 Jun 10 2014 media
drwxr-xr-x 2 0 0 6 Jun 10 2014 mnt
drwxr-xr-x 2 0 0 6 Jun 10 2014 opt
dr-xr-xr-x 96 0 0 0 Dec 29 13:55 proc
dr-xr-x--- 4 0 0 4096 Dec 27 17:12 root
drwxr-xr-x 24 0 0 680 Dec 29 15:36 run
lrwxrwxrwx 1 0 0 8 Dec 20 03:53 sbin -> usr/sbin
drwxr-xr-x 2 0 0 6 Jun 10 2014 srv
dr-xr-xr-x 13 0 0 0 Dec 29 13:55 sys
drwxrwxrwt 7 0 0 4096 Dec 29 14:12 tmp
drwxr-xr-x 13 0 0 4096 Dec 20 03:53 usr
drwxr-xr-x 21 0 0 4096 Dec 29 13:55 var
226 Directory send OK.
ftp>
ftp> pwd
Remote directory: /
ftp>
/ まで移動できる。。。
/etc/vsftpd/vsftpd.conf の設定を変更しようと思って、
# chroot_local_user=YES
⬆️このコメントを取ってNO にしたら良いのかな?と思って設定を変更したけど、
/ まで行ける。結果かわらず。
設定ファイルの説明を見ると
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 user to NOT chroot(). (Warning! chroot'ing can be very dangerous.If using chroot,make sure that the user does not have write access to the top level directory within the chroot)
よくわからんので、今日はここまで。
Proftpd の方がdefault で楽な気がするなぁ。