![]() |
| ◆ | vsftpd のインストール |
|
[root@centos]# yum -y install vsftpd <--- 入力 |
|
| ◆ | vsftpd の設定 |
|
[root@centos]# vi /etc/vsftpd/vsftpd.conf <--- 入力 途中略 # Allow anonymous FTP? (Beware - allowed by default if you comment this out). anonymous_enable=YES <--- 書き換え(匿名ユーザー)のログインを許可しない ↓ anonymous_enable=NO 途中略 # By default the server will pretend to allow ASCII mode but in fact ignore # the request. Turn on the below options to have the server actually do ASCII # mangling on files when in ASCII mode. # Beware that on some FTP servers, ASCII support allows a denial of service # attack (DoS) via the command "SIZE /big/file" in ASCII mode. vsftpd # predicted this attack and has always been safe, reporting the size of the # raw file. # ASCII mangling is a horrible feature of the protocol. #ascii_upload_enable=YES <--- コメント解除(ascil アップロードを許可) ↓ ascii_upload_enable=YES #ascii_download_enable=YES <--- コメント解除(ascil ダウンロードを許可) ↓ ascii_download_enable=YES 途中略 # 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_local_user=YES #chroot_list_enable=YES <--- コメント解除 ↓ (ホームディレクトリより上層へのアクセスを許可するユーザリストの有効) chroot_list_enable=YES # (default follows) #chroot_list_file=/etc/vsftpd/chroot_list <--- コメント解除 ↓ (ホームディレクトリより上層へのアクセスを許可するユーザリストの有効) chroot_list_file=/etc/vsftpd/chroot_list # # You may activate the "-R" option to the builtin ls. This is disabled by # default to avoid remote users being able to cause excessive I/O on large# sites. However, some broken FTP clients such as "ncftp" and "mirror" assume # the presence of the "-R" option, so there is a strong case for enabling it. #ls_recurse_enable=YES <--- コメント解除(ディレクトリごと削除できるようにする) ↓ ls_recurse_enable=YES 以下略 use_localtime=YES <--- 最終行に追記(ローカル時間で表示する) |
|
| ホームディレクトリより上層へのアクセスを許可するユーザリストの作成 | |
|
[root@centos]# vi /etc/vsftpd/chroot_list <--- 入力 |
|
| 空のファイルが開くのでホームディレクトリより上層へのアクセスを許可するユーザを箇条書きにする | |
| ◆ | FTPサーバの開始 |
|
[root@centos]# /etc/rc.d/init.d/vsftpd start <--- 入力 |
|
| vsftpd の自動起動設定 | |
|
[root@centos]# chkconfig vsftpd on <--- 入力 |
|
| 自動起動設定の確認 | |
|
[root@centos]# chkconfig --list vsftpd <--- 入力 vsftpd 0:off 1:off 2:on 3:on 4:on 5:on 6:off <--- 2・3・4・5 が on になっていればOK |
|