Setup vsftpd on Debian/Jessie.
##ReadMore##
安裝
sudo apt-get install vsftpd
設定檔:
sudo vi /etc/vsftpd.conf
編輯設定如下…
‧設定 FTP 家目錄 (自訂)
local_root=/home/ftp
‧開放寫入權限(除 Anonymous)
write_enable=YES
‧設定網域權限,使用 /etc/hosts.deny & /etc/hosts.allow
1.vim vsftpd.conf
tcp_wrappers=YES
2.vim /etc/hosts.deny
vsftpd: ALL
3.vim /etc/hosts.allow
vsftpd:120.117.73.0/24,120.117.72.0/24
‧設定只允許某些人登錄ftp,且限制不能離開家目錄
1.vi /etc/vsftpd.conf
chroot_local_user=NO
chroot_list_enable=yes
chroot_list_file=/etc/vsftpd.chroot_list
2.vi /etc/vsftpd.chroot_list
$USER
承上,若登入 FTP 出現錯誤:
00 OOPS: vsftpd: refusing to run with writable root inside chroot()
1.則需要修改所設家目錄權限
chmod 555 /home/ftp
2.根目錄以後目錄可以保有寫入權限
chmod 755 /home/ftp/*
‧開放匿名登入
vi /etc/vsftpd.conf
anonymous_enable=YES
anon_root=/home/ftp
‧上傳檔案權限 rwxr-xr-x
local_umask=022
。重啟服務
systemctl restart vsftpd.service
.Video Player on FTP Stream
1.Windows: Potplayer
2.Linux: SMPlayer
Reference:
http://serverfault.com/questions/577393/vsftpd-limit-connection-to-a-set-of-ip-addresses
http://www.linuxquestions.org/questions/linux-software-2/changing-default-directory-on-vsftp-server-167202/
http://www.liverx.org/2013/01/13/%E8%A7%A3%E6%B1%BAvsftpd%E4%B8%8D%E8%83%BD%E9%9B%A2%E9%96%8B%E5%AE%B6%E7%9B%AE%E9%8C%84%E7%9A%84%E6%96%B9%E5%BC%8F/
http://blog.miniasp.com/post/2012/08/14/Secure-vsFTPd-with-chroot-and-multiple-user-access-permission-tips.aspx