#1 2008-03-03 22:46:51
安裝 VSFTPD
安裝 xinetd,vsftpd 模組
$ ipkg install xinetd
$ ipkg install vsftpd
$ nano /opt/etc/vsftpd.conf
最後一行加入:
secure_chroot_dir=/opt/share/ftp
建立ftp資料夾
$ mkdir -p /opt/share/ftp
移除不必要的檔案
$ rm /opt/etc/xinetd.d/telnetd
$ rm /opt/etc/xinetd.d/ftp-sensor
如果執行上述兩行出現 "No such file or directory" 錯誤訊息,可以忽略
編輯 /opt/etc/xinetd.d/vsftp
$ nano /opt/etc/xinetd.d/vsftp
貼上內容:
# description: The vsftpd FTP server serves FTP connections.
# it uses normal, unencrypted usernames and passwords for auth
service ftp
{
disable = no
socket_type = stream
user = admin
server = /opt/sbin/vsftpd
server_args = /opt/etc/vsftpd.conf
wait = no
nice = 10
only_from = 0.0.0.0/0
}
將 /opt/etc/xinetd.d/vsftp 變更可執行
$ chmod +x /opt/etc/xinetd.d/vsftp
建立log檔
$ mkdir -p /opt/var/log
$ cd /opt/var/log
$ touch vsftpd.log
移除系統預設的stupid-ftp
$ killall stupid-ftpd
如果執行上述指令出現 "no process killed" 錯誤訊息,可以忽略
啟動VSFTPD
$ /opt/etc/init.d/S10xinetd
收工
參考資料:
http://abintech.azhai.org/2007/02/ftp-server-vsftp.html
http://www.sprayfly.com/wiki/VSFTP
技術問題請於論壇上集眾人之力公開討論,感恩
離線
#6 2008-03-07 23:17:24
Re: 安裝 VSFTPD
jameswoo 提到:
$killall stupid-ftpd
killall: stupid-ftpd: no process killed
...
close "ftp service" in your web admin panel instead.
BTW: vsftpd works fine in my WL-HDD , and has lower CPU time than stupid ( 1.5vs, 2.3stupid , at 2.3MBps xfer )
最後修改: love77 (2008-03-07 23:20:06)
離線
#7 2008-03-08 01:38:21
Re: 安裝 VSFTPD
*** CuteFTP 8.1 - build Nov 12 2007 ***
狀態:> [2008/3/8 上午 01:36:47] 正在取得清單「」...
狀態:> [2008/3/8 上午 01:36:47] 正在連線到 FTP 伺服器... 192.168.1.1:21 (ip = 192.168.1.1)...
狀態:> [2008/3/8 上午 01:36:47] Socket 已連線。正在等候歡迎訊息...
[2008/3/8 上午 01:36:47] 500 OOPS: vsftpd: cannot locate user specified in 'ftp_username':ftp
錯誤:> [2008/3/8 上午 01:36:47] 語法錯誤: 指令未確認。
我使用cuteftp連192.168.1.1
出現以上訊息
是說我無法自己連自己囉~~
離線
#9 2008-03-17 00:12:16
Re: 安裝 VSFTPD
刚刚依照贵文给 wl-500g 安装vsftpd,几点疑问:
1、[admin@WL500G root]$ mkdir -p /opt/share/ftp
[admin@WL500G root]$ rm /opt/etc/xinetd.d/telnetd
rm: cannot remove `/opt/etc/xinetd.d/telnetd': No such file or directory
[admin@WL500G root]$ rm /opt/etc/xinetd.d/ftp-sensor
rm: cannot remove `/opt/etc/xinetd.d/ftp-sensor': No such file or directory
此处有所不同,没有移除不必要的檔案。
2、$killall stupid-ftpd
killall: stupid-ftpd: no process killed
已经依照 Mr.Love77 : close "ftp service" in your web admin panel instead 关掉了web面板中的ftp service。
3、启动后运行CuteFTP8.1试验 ,上传下载几k的小文件,Ok啦。
上传一 126m 视频文件,到6%卡住,路由器没反应。实验2次均是如此,Log 文件:
*** CuteFTP 8.1 - build Nov 12 2007 ***
STATUS:> [2008-3-16 22:33:25] Transferring file "/tmp/local/root/[YYTvO]2006.07.30.百家讲坛_易中天品三国23_中流砥柱-易中天.rmvb"...
STATUS:> [2008-3-16 22:33:25] Checking directory existence: "/tmp/local/root".
STATUS:> [2008-3-16 22:33:25] Remote directory already exists: "/tmp/local/root".
COMMAND:> [2008-3-16 22:33:25] TYPE I
[2008-3-16 22:33:25] 200 Switching to Binary mode.
COMMAND:> [2008-3-16 22:33:25] SIZE [YYTvO]2006.07.30.百家讲坛_易中天品三国23_中流砥柱-易中天.rmvb
[2008-3-16 22:33:25] 550 Could not get file size.
STATUS:> [2008-3-16 22:33:25] Requested action not taken (e.g., file or directory not found, no access).
COMMAND:> [2008-3-16 22:33:25] CWD /tmp/local/root/[YYTvO]2006.07.30.百家讲坛_易中天品三国23_中流砥柱-易中天.rmvb
[2008-3-16 22:33:25] 550 Failed to change directory.
STATUS:> [2008-3-16 22:33:25] Requested action not taken (e.g., file or directory not found, no access).
COMMAND:> [2008-3-16 22:33:25] CWD /tmp/local/root
[2008-3-16 22:33:25] 250 Directory successfully changed.
STATUS:> [2008-3-16 22:33:25] PWD skipped. Current folder: "/tmp/local/root".
COMMAND:> [2008-3-16 22:33:25] PASV
[2008-3-16 22:33:25] 227 Entering Passive Mode (192,168,1,1,118,190)
COMMAND:> [2008-3-16 22:33:25] STOR [YYTvO]2006.07.30.百家讲坛_易中天品三国23_中流砥柱-易中天.rmvb
STATUS:> [2008-3-16 22:33:25] Connecting FTP data socket... 192.168.1.1:30398...
[2008-3-16 22:33:25] 150 Ok to send data.
ERROR:> [2008-3-16 22:34:52] Timeout (60000 ms) occurred on sending data to the server.
ERROR:> [2008-3-16 22:35:52] Timeout (60000 ms) occurred on receiving server response.
STATUS:> [2008-3-16 22:35:52] Waiting 60 seconds...
STATUS:> [2008-3-16 22:36:53] Transferring file "/tmp/local/root/[YYTvO]2006.07.30.百家讲坛_易中天品三国23_中流砥柱-易中天.rmvb"...
STATUS:> [2008-3-16 22:36:53] Connecting to FTP server... 192.168.1.1:21 (ip = 192.168.1.1)...
STATUS:> [2008-3-16 22:36:53] Socket connected. Waiting for welcome message...
ERROR:> [2008-3-16 22:37:54] Timeout (60000 ms) occurred on receiving server response.
STATUS:> [2008-3-16 22:37:54] Waiting 30 seconds...
STATUS:> [2008-3-16 22:50:19] Reusing the existing connection.
STATUS:> [2008-3-16 22:50:19] Transferring file "/tmp/local/root/[YYTvO]2006.07.30.百家讲坛_易中天品三国23_中流砥柱-易中天.rmvb"...
STATUS:> [2008-3-16 22:50:19] Checking directory existence: "/tmp/local/root".
STATUS:> [2008-3-16 22:50:19] Remote directory already exists: "/tmp/local/root".
COMMAND:> [2008-3-16 22:50:19] TYPE I
[2008-3-16 22:50:19] 200 Switching to Binary mode.
COMMAND:> [2008-3-16 22:50:19] SIZE [YYTvO]2006.07.30.百家讲坛_易中天品三国23_中流砥柱-易中天.rmvb
[2008-3-16 22:50:19] 550 Could not get file size.
STATUS:> [2008-3-16 22:50:19] Requested action not taken (e.g., file or directory not found, no access).
COMMAND:> [2008-3-16 22:50:19] CWD /tmp/local/root/[YYTvO]2006.07.30.百家讲坛_易中天品三国23_中流砥柱-易中天.rmvb
[2008-3-16 22:50:19] 550 Failed to change directory.
STATUS:> [2008-3-16 22:50:19] Requested action not taken (e.g., file or directory not found, no access).
COMMAND:> [2008-3-16 22:50:19] CWD /tmp/local/root
[2008-3-16 22:50:19] 250 Directory successfully changed.
STATUS:> [2008-3-16 22:50:19] PWD skipped. Current folder: "/tmp/local/root".
COMMAND:> [2008-3-16 22:50:19] PASV
[2008-3-16 22:50:19] 227 Entering Passive Mode (192,168,1,1,215,151)
COMMAND:> [2008-3-16 22:50:19] STOR [YYTvO]2006.07.30.百家讲坛_易中天品三国23_中流砥柱-易中天.rmvb
STATUS:> [2008-3-16 22:50:19] Connecting FTP data socket... 192.168.1.1:55191...
[2008-3-16 22:50:19] 150 Ok to send data.
ERROR:> [2008-3-16 22:51:34] Timeout (60000 ms) occurred on sending data to the server.
ERROR:> [2008-3-16 22:52:34] Timeout (60000 ms) occurred on receiving server response.
STATUS:> [2008-3-16 22:52:34] Waiting 60 seconds...
不知何故,迷惑中,另外怎样限制ftp流量呢?以免占用网络资源太大。
離線
#10 2008-03-17 09:33:16
Re: 安裝 VSFTPD
新版 Oleg's firmware 1.9.2.7-9已捨去了笨蛋FTPD(stupid-ftpd)並內建 VSFTPD,所有權限、流量控管也都已整合至預設管理界面,有興趣的朋友可以試試。
技術問題請於論壇上集眾人之力公開討論,感恩
離線
相關討論主題
主題 | 回覆 | 點閱 | 最後發表 |
---|---|---|---|
ASUS WL-520GU 安裝 vsftpd 作者 ericwang1017
|
2 | 16217 | 2009-10-05 01:42:07 作者 ericwang1017 |
VSFTPD update 後出問題 作者 Haily
|
0 | 6523 | 2009-07-03 01:32:40 作者 Haily |
vsftpd 能加入 client 端big5 支援嘛? 作者 changenhsin
|
0 | 6916 | 2008-07-06 15:41:00 作者 changenhsin |
转发:vsftpd 配置手册 作者 infall
|
0 | 5920 | 2008-03-06 01:02:35 作者 infall |