2010年10月14日 星期四

vsftp設定

我在vsftpd.conf多加了幾個設定
local_umask=002
pasv_enable=YES
pasv_min_port=xxxxxx
pasv_max_port=xxxxxx
chroot_local_user=YES
user_config_dir=/etc/vsftpd/userconf

大部分的指令網路都查的到
而最後一條指令是設定個別user的conf檔存放位置

例如要把user1的家目錄指定到網頁資料夾可以這樣寫
vi /etc/vsftpd/userconf/user1

local_root=/var/www/html

這樣user1一登入便會進到html資料夾內
而且我有設定chroot_local_user=YES
所以user1也無法離開根目錄亂逛囉!

另外如果要使用xinetd管理vsftp
vsftp有寫好的設定檔供使用
cp /usr/share/doc/vsftpd-2.0.5/vsftpd.xinetd /etc/xinetd.d/vsftpd

存好後將disable改為no
另外要注意的是要將vsftp的主動模式(stand alone)關掉
我就是沒有關所以一直不成功...
vi /etc/vsftpd/vsftpd.conf

listen=NO
可以開始使用囉
--
參考網頁
http://www.linuxpk.com/5831.html
http://itnewsvendor.appspot.com/2071040-rhel5_xinetd_%E6%96%B9%E5%BC%8F.html
http://linux.vbird.org/linux_server/0410vsftpd.php#server_vsftpd.conf

沒有留言:

張貼留言