顯示具有 FTP 標籤的文章。 顯示所有文章
顯示具有 FTP 標籤的文章。 顯示所有文章

2015年2月3日 星期二

foldersync reupload issue

android上使用foldersync同步到FTP時發現會有重複同步的問題,看了一下是由於兩邊檔案時間不同,但是明明是同一個檔案。後來研究了一下似乎是foldersync的問題,沒有支援MFMT時間會錯亂。解決方法可以將容許時間調大,或者是乾脆就不要覆蓋舊的,只能等更新了。

參考資料
https://groups.google.com/forum/#!topic/tacitdynamics/GhfLILUGo2g

2013年10月24日 星期四

android內建vpn撥接傳輸速度上不去問題

使用android內建VPN撥接到自己架設的PPTP VPN server播放影片或傳輸檔案時,常會lag或者是傳輸很慢,使用電腦則不會,因此讓我想到也許是android效能不足無法同時處理。或者之後等手機效能趕上時就不會如此,不過目前我得到的暫時解決方案是使用FTP協定,利用Fillazilla ftp server架設伺服器並用es file explorer連入,便可以直接點選檔案並撥放串流,我是用MX Player載入DTS自訂解碼器之後便可以很輕鬆的看影片,也不會再像之前一樣LAG,真的很方便呢。

Filezilla server資料夾看不到問題

之前使用Fizezilla server時發現有一個資料夾就是看不到,怎麼設定都不行,最後發現是由於權限不足,由於是在FTP介面下所以並不會有提示,而是空白給你看。我一開始以為是檔案或資料夾使用了特殊字元結果後來測試發現不是(有的Server軟體會因為這樣而無法連,而一開始沒有想到是權限問題是由於我連線網路磁碟機時有用有權限的帳號登入連線,不過結論似乎FTP並不會繼承電腦網路磁碟機的連入權限,後來將權限開放就OK了。

Jeff Chen
1 年前公開
FileZilla FTP server 分享 網路芳鄰磁碟方法
1.以本機帳戶登入(administrator),安裝好FileZilla server.
2.先建立一個具有系統管理員權限的帳號,並設好密碼
3.在「我的電腦」按右鍵
4.選擇「管理」
5.對「服務及應用程式」點兩下
6.點選「服務」
7.在右邊找到「Filezilla Server FTP server」並對它點兩下
8.在「登入」那一頁,輸入步驟2新建立的帳戶與密碼來執行
9.登出或重開機以步驟2新建立的帳戶登入,直接進入Filezilla server安裝目錄啟動FileZilla Server Interface進行帳戶管理
10.會發現管理者可以使用網路芳鄰的網路磁碟進行目錄資源的設置
網芳設定方式,\\server_name\share_folder (server_name: 192.168.x.x & share_folder: share folder name)
+1
新增留言

2018/10/7更新(提醒自己重新安裝filezilla時port為55555)
遇到更改使用者名稱後連上ftp server顯示空目錄問題(550 file not found, 430 internal error creating directory)。經過一番debug後發現解決方法為上面登入頁面先輸入錯誤密碼後重新啟動待提示無法啟動再更改為正確密碼。可能是windows的bug(因為選擇使用系統帳戶還是不行)。

參考資料
https://plus.google.com/app/basic/stream/z13hgp4bayi1gvg5404chbypemudgvcxmx00k
自己

2013年7月13日 星期六

有關FTP及Apache上傳速度卡住問題

Apache部分


regedit裡新增兩個十進位DWORD
[HKEY_LOCAL_MACHINE \SYSTEM \CurrentControlSet \Services \AFD \Parameters]
DefaultReceiveWindow = 327680
DefaultSendWindow = 327680

資料來源http://smallvoid.com/article/winnt-winsock-buffer.html

Configure the winsock default send- and receive-buffer size

12 October 2002 by Snakefoot | Comment » | Trackback Off
Usually when reading about TCPIP there is only mentioned one Receive Window for a connection, which is used to control congestion created by network latency.

In the WinNT network architecture a layer is placed on top of the TCPIP layer called AFD(Ancillary Function Driver for Winsock). The AFD provides the winsock interface, which is used by most network applications in Windows and is also supporting things like DNS and DHCP.

The AFD uses two windows which acts as a flowcontrol for the application creating the socket:
  • Send Window: Used when the application is sending data over a connection, if more data is sent than the receiver is able to acknowledge then the AFD-Send-Window will block the transfer for the application, when it reaches the limit of the AFD-Send-Window. The application creating the socket can use setsockopt to adjust SO_SNDBUF.
  • Receive Window: Acts just like the TCPIP-Receive Window, and when creating a Winsocket over TCPIP, then AFD will use the TCPIP Receive Window as AFD-Receive Window. The application creating the socket can use setsockopt to adjust SO_RCVBUF.
The default size of the two AFD-Windows is configured at boot time and is dependent on the available amount of physical memory:
  • 4096 bytes if less than 19 MByte RAM
  • 8192 bytes if more than 19 MByte RAM
If using a high latency or high bandwidth network then the AFD windows can affect performance. A small AFD-Send-Window will constantly be blocking the application sending data. A small AFD-Receive-Window will constantly be saturating the application receiving data (And blocking the remote sender). The two AFD-Windows should have the same value as the optimal TCPIP-Receive-Window to get the best speed.

To set the default size of the AFD-Windows use the following DWORD registry keys :
[HKEY_LOCAL_MACHINE \SYSTEM \CurrentControlSet \Services \Afd \Parameters]
DefaultReceiveWindow = 16384
DefaultSendWindow = 16384
Note that the AFD-Windows should be rounded to a multiple of memory page size (Usually 4096 Bytes). Not a multiple of the Maximum Segment Size(MSS) which is recommended for the TCPIP-Window.

Related : Recommended settings for the TCP/IP stack

More Info MSDN - Write Scalable Winsock Apps Using Completion Ports
More info MS KB Q214397
More info MS KB Q246984
More info MS KB Q311084


FTP部分


簡單來說就是transfer buffer size需要加大。之前我的設定32768結果卡在2MB/s(我的上限是4MB/s),改成3276800後現在正常了,寫在這邊供需要的人參考。

資料來源:http://trac.filezilla-project.org/ticket/820

Ticket #820 (closed Bug report)

Opened 8 years ago
Last modified 6 years ago

FileZilla Server incredibly slow

Reported by:prezlaOwned by:ci-dev
Priority:normalComponent:FileZilla Server
Keywords:Cc:prezla, ci-dev, codesquid
Operating system type:Operating system version:

Description 

FileZilla Server 0.9.5 is incredibly slow. I was
running it for and FTP server, but have since swapped
it out for WARFTPd 1.82.0.10 because of the following
performance numbers (notice that FileZilla is almost 3
times slower than WARFTPd, and Microsoft FTP is only
about 1 sec slower than WARFTPd):
FileZilla Server 0.9.5:

ftp> get catalog.pdf
200 Port command successful
150 Opening data channel for file transfer.
226 Transfer OK
ftp: 42509572 bytes received in 18.24Seconds
2330.95Kbytes/sec.
Microsoft FTP Server 5.1 (XP):

ftp> get catalog.pdf
200 PORT command successful.
150 Opening BINARY mode data connection for
catalog.pdf(42509572 bytes).
226 Transfer complete.
ftp: 42509572 bytes received in 8.14Seconds
5221.02Kbytes/sec.
WARFTPd 1.82.00-RC10:

ftp> get catalog.pdf
200 PORT command successful.
150 Opening BINARY mode data connection for catalog.pdf
(42509572 bytes).
226 Transfer complete. 42509572 bytes in 7.00 sec.
(5930.465 Kb/s)
ftp: 42509572 bytes received in 6.99Seconds
6080.61Kbytes/sec.
My platform is:
Intel Pentium III 933
512 MB RAM
Microsoft Windows XP SP2

Change History

Changed 8 years ago by codesquid 

Please have a look at the transfer buffer option in the
settings dialog. The default is 4096 which works best on
most systems. You may have to modify this value, especially
if you have modified any options of your TCP/IP stack or are
using the useless, so-called internet accellerators.

Changed 8 years ago by prezla 

Thanks for the response. Performance has improved
signicantly by increasing the transfer buffer to 16384.
Is there a reason why the default is 4096? I'm assuming
that the buffer is allocated for each connection. If this
is true, I would assume this is done to conserve memory?

Changed 6 years ago by codesquid 

The default buffer sizes have since been increased.

2013年3月4日 星期一

ftp behind firewall

經過一天的研究,總算知道為何之前有時候會連不上自己架的FTP了。原來是PASV和PORT模式的問題。如果FTP SERVER是在防火牆後面,那只開啟FTP PORT NAT是不足的,因為PASV模式SERVER會跟CLIENT說:「我把檔案藏在XXXX PORT,有本事就來拿吧。」所以防火牆也必須把SERVER另外開啟的PORT NAT才行,我自己的測試是大概從1140開始分配,可能會有所出入。

另外順帶一提,PASV模式是為了因應PORT模式SERVER要將資料傳送到CLIENT端,但CLIENT端卻位於防火牆後所以無法連接到而產生,所以使用PASV模式可以由SERVER端這邊主控而不會受制於CLIENT端之設定無法更改。