2008年6月16日 星期一

VSFTP Server 建立

須要安裝的套件 vsftpd-2.0.xxx.rpm
rpm –ivh vsftpdxxx.rpm
chkconfig vsftpd on
service vsftpd start
相關設定 /etc/vsftpd/vsftpd.conf
匿名存取anonymous_enable= YES NO
匿名上傳anon_upload_enable=YES NO
改變上傳擁有者chown_uploads=YES NO
改變上傳擁有者名chown_username=nobody
預設匿名上傳檔案屬性anon_umask=077
系統帳號可否登入 local_enable=YES NO
不可登入的帳號 /etc/vsftpd.ftpusers 一行一個user name
限制local user登入ftp僅能在home directory內動
chroot_list_enable=YES NO
設定何使用者僅能在home directory內動
/etc/vsftpd/chroot_list
同一IP可建立幾個連線max_per_ip=1
伺服器最大服務數max_clients=5
匿名下載頻寬anon_max_rate=1024(Byte/Sec)
系統帳號下載頻寬local_max_rate=1024(Byte/Sec)
vsftp 服務的IP listen_address=192.168.1.254
系統帳號使用者的根目錄 local_root=/var/ftp/localuser
匿名帳號使用者的根目錄 anon_root=/var/ftp/anonuser
幾秒無動作就斷線idle_session_timeout=60 (sec)
對個別使用者進行設定 user_config_dir=/etc/vsftpd/user_config
    在/etc/vsftpd/user_config目錄中建立檔案,檔名同帳號,其內設定與前述相同。
    例如:某一個使用者(andy)的目錄要放在/var/www下
        建立 /etc/vsftpd/user_config/andy 內容為
        local_root=/var/www
    例如:某一個使用者(jack)的權限只能下載,不能上傳
        建立 /etc/vsftpd/user_config/jack 內容為
        download_enable=YES
        write_enable=NO
設定何IP可不可登入 /etc/hosts.allow and /etc/hosts.deny
vsftpd:192.168.1.97 or vsftpd:192.168.1.0/255.255.255.0

沒有留言: