文件传输协议:修订间差异

删除的内容 添加的内容
→‎外部链接:​ // Edit via Wikiplus
Iamnotlin4留言 | 贡献
无编辑摘要
标签2017版源代码编辑
 
(未显示11个用户的19个中间版本)
第1行:
{{NoteTA
| G1 = IT
|1=zh-cn:客户端;zh-tw:用戶端;
}}
{{Redirect|FTP}}
第8行 ⟶ 第9行:
}}
{{网络协议}}
'''文件传输协议'''({{Lang-en|'''F'''ile '''T'''ransfer '''P'''rotocol}},縮寫'''FTP''')是一个用於[[網絡|<span data-segmentid="4" class="cx-segment"></span>]][[计算机网络]]上在<span data-segmentid="4" class="cx-segment">[[主從式架構|客户端和服务器]]</span>之進行傳輸文件傳輸的[[应用层]]<span data-segmentid="4" class="cx-segment">[[网络传输协议|协议]]</span>传送文件传送(file transfer)和存取文件存取(file access)之间的区别在于:前者由FTP提供,后者由[[网络文件系统|NFS]]等应用系统提供<ref>{{Cite book|title=TCP/IP详解 卷一:协议|year=2000|url=https://archive.org/details/tcpipxiangjiejua0000unse|last=W.Richard Stevevs 著|first=范建华 等译|publisher=机械工业|year=|isbn=978-7-111-07566-0|location=|pages=[https://archive.org/details/tcpipxiangjiejua0000unse/page/316 316]}}</ref>。参考文献 由<nowiki/>RFC 959 定义了此<nowiki/>规范。
 
FTP是一个8位的客户端-服务器协议,能操作任何类型的文件而不需要进一步後續处理,就像[[MIME]]或[[Unicode]]一样是,FTPFTP极高的延时,意味着,从开始请求到第一次接收需求数据间的时间,会非常长;并且必须不时的必须执行一些冗长的登录进程。
 
== 历史 ==
原始规范由 Abhay Bhushan 编写原始规范,并于1971年4月16日作为 <nowiki/>RFC 114 <nowiki/>发布。直到1980年,FTP 才在[[TCP/IP]]的前身NCP运行。该协议先被TCP/IP版本,RFC 765(1980年6月)取代,后来又被 RFC 959(1985年10月)所取代,这也是当前规范。RFC 959<nowiki/>提出了若干标准修改,例如 RFC 1579(1994年2月)使 FTP 能够穿越[[网络地址转换|NAT]]与[[防火墙]](被动模式),RFC 2228(1997年6月)提出安全扩展,RFC 2428(1998年9月)增加了对[[IPv6]]的支持,并定义了一种新型的被动模式。
 
== 概述 ==
第38行 ⟶ 第39行:
# 客户端通过本地的数据端口建立一个和服务器20号端口的连接,然后向服务器发送一个应答,告诉服务器它已经建立好了一个连接。
 
== 浏览器软件支持情况 ==
=== 浏览器 ===
大部分常见的[[网页浏览器]]都可以检索FTP服务器上托管的文件,尽管它们并不支持扩展协议,如[[FTPS]]。<ref name="matthews">{{cite book |last=Matthews |first=J. |year=2005 |title=Computer Networking: Internet Protocols in Action |url=https://archive.org/details/computernetworki0000matt |edition=1st |location=Danvers, MA |publisher=John Wiley & Sons Inc.}}</ref>当浏览器访问FTP格式的URL时,将以Web文件目录显示远程服务器上的可访问内容。使用类似{{link-en|FireFTP|FireFTP}}客户端可获得FTP扩展协议的完整支持。
 
Chrome和Firefox等主流浏览器都将计划弃用对FTP的支持,<ref>{{cite web|url=https://www.bleepingcomputer.com/news/google/chrome-and-firefox-developers-aim-to-remove-support-for-ftp/|title=Chrome and Firefox Developers Aim to Remove Support for FTP|date=2018-11-26|access-date=2020-01-26|website=bleepingcomputer.com|first1=Lawrence|last1=Abrams|archive-date=2020-11-08|archive-url=https://web.archive.org/web/20201108115459/https://www.bleepingcomputer.com/news/google/chrome-and-firefox-developers-aim-to-remove-support-for-ftp/|dead-url=no}}</ref>目前2019年推出的Chrome 82已移除停止对FTP支持<ref>{{cite web |author=Martin Brinkmann |title=Google Chrome 82 won't support FTP anymore |url=https://www.ghacks.net/2019/08/16/google-chrome-82-wont-support-ftp-anymore/ |website=ghacks |accessdate=2020-04-20 |language=en |date=2019-08-16 |archive-date=2021-02-05 |archive-url=https://web.archive.org/web/20210205132606/https://www.ghacks.net/2019/08/16/google-chrome-82-wont-support-ftp-anymore/ |dead-url=no }}</ref>,在2020年因[[COVID-19疫情]]增加的[[遠距辦公]]需求而短暫恢復FTP,但於2021年10月推出的Chrome95完全移除FTP相關程式碼<ref>{{cite news |author1=林妍溱 |title=Google Chrome 95將徹底移除FTP程式碼 |url=https://www.ithome.com.tw/news/147392 |accessdate=2021-10-21 |publisher=iThome |date=2021-10-21 |archive-date=2021-10-27 |archive-url=https://web.archive.org/web/20211027120324/https://www.ithome.com.tw/news/147392 |dead-url=no }}</ref>。而Firefox将于则将原預定于版本77中停止支持FTP<ref>{{cite web |author=Martin Brinkmann |title=Mozilla will remove FTP support in the Firefox web browser |url=https://www.ghacks.net/2020/03/19/mozilla-will-remove-ftp-support-in-the-firefox-web-browser/ |website=ghacks |accessdate=2020-04-20 |language=en |date=2020-03-19 |archive-date=2021-02-22 |archive-url=https://web.archive.org/web/20210222142344/https://www.ghacks.net/2020/03/19/mozilla-will-remove-ftp-support-in-the-firefox-web-browser/ |dead-url=no }}</ref>,最終在2021年7月發行的90版正式停止支援FTP協定<ref>{{cite news |author1=林妍溱 |title=Firefox 90正式終止支援FTP |url=https://www.ithome.com.tw/news/145834 |accessdate=2021-10-21 |publisher=iThome |date=2021-07-23 |archive-date=2021-10-25 |archive-url=https://web.archive.org/web/20211025195633/https://www.ithome.com.tw/news/145834 |dead-url=no }}</ref>。微軟的[[Edge瀏覽器]]也在2020年起停止支援FTP,[[Internet Explorer 11]]仍保留FTP用戶端,直到2022年6月15日終止支援<ref>{{cite web |author1=郑丽媛 |title=FTP 时代已逝:Firefox、Chrome 等多个浏览器均已弃用! |url=https://mp.weixin.qq.com/s?__biz=MjM5MjAwODM4MA==&mid=2650857604&idx=1&sn=1ae9ed435e0d85416119de1f5ccf168c&chksm=bd5891578a2f1841067fd3b6c482376e27bd6b444937b0deb0a2c32653d5bca2aac0db0a7bd2&scene=27#wechat_redirect |website=CSDN微信公眾號 |accessdate=2021-07-23 |archive-date=2021-10-25 |archive-url=https://web.archive.org/web/20211025192441/https://mp.weixin.qq.com/s?__biz=MjM5MjAwODM4MA==&mid=2650857604&idx=1&sn=1ae9ed435e0d85416119de1f5ccf168c&chksm=bd5891578a2f1841067fd3b6c482376e27bd6b444937b0deb0a2c32653d5bca2aac0db0a7bd2&scene=27#wechat_redirect |dead-url=no }}</ref>。
 
====语法====
FTP URL 格式已在{{IETF RFC|1738}}指定,格式为:<code>ftp://[user[:password]@]host[:port]/url-path</code>(方括号内为可选参数)。
 
有关指定用户名和密码的更多详细信息,可以在浏览器的文档中找到(例如[[Firefox]]<ref>{{cite web |url=https://support.mozilla.org/en-US/kb/Accessing%20FTP%20servers#w_ftp-servers-that-require-a-username-and-password |title=Accessing FTP servers &#124; How to &#124; Firefox Help |publisher=Support.mozilla.com |date=2012-09-05 |accessdate=2013-01-16 |archive-date=2021-01-26 |archive-url=https://web.archive.org/web/20210126004632/https://support.mozilla.org/en-US/kb/Accessing%20FTP%20servers#w_ftp-servers-that-require-a-username-and-password |dead-url=no }}</ref>和[[Internet Explorer]]<ref>{{Cite web |url=https://support.microsoft.com/en-us/kb/135975 |title=How to Enter FTP Site Password in Internet Explorer |access-date=2020-04-20 |archive-url=https://web.archive.org/web/20150702005840/https://support.microsoft.com/en-us/kb/135975 |archive-date=2015-07-02 |dead-url= }} Written for IE versions 6 and earlier. Might work with newer versions.</ref>)。默认情况下,大多数Web浏览器使用被动(PASV)模式,该模式更容易遍历终端防火墙。
 
=== 下载管理器 ===
大部分常见的[[下载管理器]]都可以收取FTP服务器上托管的文件,其中一些还提供界面来检索FTP服务器上托管的文件。{{link-en|DownloadStudio|DownloadStudio}}和Internet Download Accelerator既能从FTP服务器下载文件,又能查看FTP服务器上的文件。<ref>{{cite web |url=http://www.conceiva.com/products/downloadstudio/features.asp |title=DownloadStudio - Internet Download Manager And Download Accelerator - Features |author= |publisher=Conceiva |date= |access-date=2021-10-19 |archive-date=2021-09-08 |archive-url=https://web.archive.org/web/20210908015938/http://www.conceiva.com/products/downloadstudio/features.asp |dead-url=no }}</ref><ref>{{cite web |url=https://www.westbyte.com/ida/index.phtml?page=features&tmp=1&lng=English |title=Internet Download Accelerator {{!}} Features |author= |publisher=WestByte |date= |access-date=2021-10-20 |archive-date=2021-09-04 |archive-url=https://web.archive.org/web/20210904171532/https://westbyte.com/ida/index.phtml?page=features&tmp=1&lng=English |dead-url=no }}</ref>
 
===其他===
[[LibreOffice]]支持打开FTP服务器上的文件,但从7.4版本起,这一功能被标记为过时,开发者打算在将来的版本中将其移除。<ref>{{Cite web |url=https://wiki.documentfoundation.org/ReleaseNotes/7.4 |title=LibreOffice 7.4: Release Notes |publisher=The Document Foundation's Wiki |accessdate=2022-09-10 |archive-date=2022-08-24 |archive-url=https://web.archive.org/web/20220824072927/https://wiki.documentfoundation.org/ReleaseNotes/7.4 |dead-url=no }}</ref>
 
== 安全性 ==
<span data-segmentid="152" class="cx-segment">FTP不是一项安全的协议,并且具有许多安全漏洞<ref name="nurdle">{{Cite web|title=Securing FTP using SSH|url=http://www.nurdletech.com/linux-notes/ftp/ssh.html|publisher=Nurdletech.com|access-date=2019-01-22|archive-date=2020-11-24|archive-url=https://web.archive.org/web/20201124230128/https://nurdletech.com/linux-notes/ftp/ssh.html|dead-url=no}}</ref>。</span><span data-segmentid="153" class="cx-segment">1999年5月</span><span data-segmentid="152" class="cx-segment">发布的</span><span data-segmentid="153" class="cx-segment">{{IETF RFC|2577}}</span>中<span data-segmentid="153" class="cx-segment">列出了以下几个主要的漏洞:</span>
 
* [[暴力破解]]
第55行 ⟶ 第63行:
* [[數據包分析器|数据包捕获]]
* <span data-segmentid="161" class="cx-segment">端口窃取(猜测下一个开放端口并篡夺合法连接)</span>
* <span data-segmentid="162" class="cx-segment">{{link-en|[[欺骗攻击|Spoofing attack}}]]</span>
* <span data-segmentid="164" class="cx-segment">[[用户|用户名]]枚举</span>
 
<span data-segmentid="166" class="cx-segment">通过FTP传输的流量不会被加密,所有传输通过明文进行的。任何能够在网络上执行数据包捕获( [[數據包分析器|嗅探]] )的人都可以读取用户名、密码、命令内容和数据<ref name="tcpip">{{Cite web|author=Kozierok|first=Charles M.|year=2005|title=The TCP/IP Guide v3.0|url=http://www.tcpipguide.com/free/t_FTPOverviewHistoryandStandards.htm|publisher=Tcpipguide.com|access-date=2019-01-22|archive-date=2021-01-11|archive-url=https://web.archive.org/web/20210111073429/http://www.tcpipguide.com/free/t_FTPOverviewHistoryandStandards.htm|dead-url=no}}</ref><ref name="nurdle2">{{Cite web|title=Securing FTP using SSH|url=http://www.nurdletech.com/linux-notes/ftp/ssh.html|publisher=Nurdletech.com|access-date=2019-01-22|archive-date=2020-11-24|archive-url=https://web.archive.org/web/20201124230128/https://nurdletech.com/linux-notes/ftp/ssh.html|dead-url=no}}</ref>。</span><span data-segmentid="168" class="cx-segment">此问题在加密机制(如[[傳輸層安全性協定|TLS]]或SSL)产生之前的许多Internet协议规范(如[[简单邮件传输协议|SMTP]] 、[[Telnet]] 、POP和IMAP)中较为普遍<ref name="clark">{{Cite book|title=Data Networks IP and the Internet|last=Clark|first=M.P.|publisher=John Wiley & Sons Ltd.|year=2003|edition=1st|location=West Sussex, England}}</ref>。</span>
 
<span data-segmentid="172" class="cx-segment">此问题的常见解决方案包括:</span>
第89行 ⟶ 第97行:
 
=== 简单文件传输协议 ===
'''简单文件传输协议'''(Simple File Transfer Protocol)由{{IETF RFC|913}}定义,其复杂程度介于TFTP和FTP之间。它从未在[[互联网]]上被广泛接受。它通过端口115运行,支持三种类型的数据传输: [[ASCII]] 、 [[二进制文件|二进制]]和连续。该协议还支持使用用户名和密码登录、文件夹和文件管理(包括''重命名''、''删除''、''上传''、''下载'')。
 
== 参考文献 ==
=== 引用 ===
{{Reflist}}
 
=== 来源 ===
* RFC 0959文件传输协议。J.Postel, J.Reynolds. 1985.10(格式:文本,147316字节。http://www.ietf.org/rfc/rfc959.txt {{Wayback|url=http://www.ietf.org/rfc/rfc959.txt |date=20130326015352 }} )。最早的RFC 114和之后的RFC 765已被废除。
{{ReflistH}}
* RFC 0959文件传输协议》. J. Postel,; J. Reynolds. 1985.10(格式:文本,147316字节. http://www.ietf.org/rfc/rfc959.txt {{Wayback|url=http://www.ietf.org/rfc/rfc959.txt |date=20130326015352 }} ). 最早的RFC 114和之后的RFC 765已被废除。
{{ReflistF}}
 
== 参见 ==
第110行 ⟶ 第122行:
== 外部链接 ==
 
{{normdaten}}
[[Category:FTP| ]]
[[Category:应用层协议]]