Windows实例搭建FTP站点

<p class="shortdesc">本文介绍如何使用Windows实例搭建FTP站点,本文以Win2019_DataCenter_64bit_CN 为例。</p> <section class="section" id="Windows_FTP_Site__section_t2r_2yy_svb"><h2 class="doc-tairway">步骤一:添加IIS以及FTP服务角色</h2> <div class="p"> <ol class="ol" id="Windows_FTP_Site__ol_lvk_fyy_svb"> <li class="li"> 登录<a class="xref" href="https://www.ocftcloud.com/console/ecs/overview" target="_blank" rel="external noopener">云服务器ECS</a>。 </li> <li class="li"> 单击<span class="ph menucascade"><span class="ph uicontrol">开始</span><abbr> > </abbr><span class="ph uicontrol">服务器管理器</span></span>。 </li> <li class="li"> 进入<span class="ph uicontrol">仪表盘</span>页面,单击<span class="ph uicontrol">添加角色和功能</span>。 <div class="p"> <img class="image" id="Windows_FTP_Site__image_mn4_xgj_2sb" width="800" src="https://obs-cn-shanghai.fincloud.pinganyun.com/pacloud/20232006152128-1cd6eef991c9.png"> </div> </li> <li class="li"> 弹出<span class="ph uicontrol">添加角色和功能向导</span>页面,在<span class="ph uicontrol">开始之前</span>页签中,单击<span class="ph uicontrol">下一步</span>。 <div class="p"> <img class="image" id="Windows_FTP_Site__image_c3l_ygj_2sb" src="https://obs-cn-shanghai.fincloud.pinganyun.com/pacloud/20232006152128-10ade28695fa.png"> </div> </li> <li class="li"> 选择<span class="ph uicontrol">基于角色或基于功能的安装</span>,单击<span class="ph uicontrol">下一步</span>。 <div class="p"> <img class="image" id="Windows_FTP_Site__image_xlw_khj_2sb" src="https://obs-cn-shanghai.fincloud.pinganyun.com/pacloud/20232006152128-1c32dcab95ed.png"> </div> </li> <li class="li"> 选择<span class="ph uicontrol">从服务器池中选择服务器</span>,单击<span class="ph uicontrol">下一步</span>。 <div class="p"> <img class="image" id="Windows_FTP_Site__image_i22_4hj_2sb" src="https://obs-cn-shanghai.fincloud.pinganyun.com/pacloud/20232006152128-1d7bd8659c03.png"> </div> </li> <li class="li"> 单击<span class="ph uicontrol">Web服务器(IIS)</span>,在弹出的<span class="ph uicontrol">添加角色和功能向导</span>对话框中单击<span class="ph uicontrol">添加功能</span>,再单击<span class="ph uicontrol">下一步</span>。 <div class="p"> <img class="image" id="Windows_FTP_Site__image_akj_phj_2sb" src="https://obs-cn-shanghai.fincloud.pinganyun.com/pacloud/20232006152128-1db3937e907a.png"> </div><div class="p"> <img class="image" id="Windows_FTP_Site__image_us2_qhj_2sb" src="https://obs-cn-shanghai.fincloud.pinganyun.com/pacloud/20232006152128-1978931b9493.png"> </div> </li> <li class="li"> 单击两次<span class="ph uicontrol">下一步</span>,进入<span class="ph uicontrol">选择角色服务</span>页面<span class="ph uicontrol">角色服务</span>页签。 </li> <li class="li"> 勾选<span class="ph uicontrol">FTP服务器</span>,包括<span class="ph uicontrol">FTP服务</span>和<span class="ph uicontrol">FTP扩展</span>,单击<span class="ph uicontrol">下一步</span>。 <div class="p"> <img class="image" id="Windows_FTP_Site__image_pdv_qhj_2sb" src="https://obs-cn-shanghai.fincloud.pinganyun.com/pacloud/20232006152128-1495dc8c9adc.png"> </div> </li> <li class="li"> 进入<span class="ph uicontrol">确认安装所选内容</span>页面,单击<span class="ph uicontrol">安装</span>,开始部署服务角色。 <div class="p"> <img class="image" id="Windows_FTP_Site__image_mzm_rhj_2sb" src="https://obs-cn-shanghai.fincloud.pinganyun.com/pacloud/20232006152128-1f96d32a96e8.png"> </div> </li> <li class="li"> 安装完成后,单击<span class="ph uicontrol">关闭</span>。 <div class="p"> <img class="image" id="Windows_FTP_Site__image_enc_thj_2sb" src="https://obs-cn-shanghai.fincloud.pinganyun.com/pacloud/20232006152128-1dc724699ce8.png"> </div> </li> </ol> </div> </section> <section class="section" id="Windows_FTP_Site__section_scp_fyy_svb"><h2 class="doc-tairway">步骤二:创建FTP用户名及密码</h2> <p class="p"> 创建Windows用户名和密码,用于FTP使用。如果您希望匿名用户也可以访问,则无需操作此步骤。 </p> <ol class="ol" id="Windows_FTP_Site__ol_wvc_hyy_svb"> <li class="li"> 在<span class="ph uicontrol">服务器管理器</span>页面,单击<span class="ph menucascade"><span class="ph uicontrol">仪表板</span><abbr> > </abbr><span class="ph uicontrol">工具</span><abbr> > </abbr><span class="ph uicontrol">计算机管理</span></span>。 <div class="p"> <img class="image" id="Windows_FTP_Site__image_wxj_yhj_2sb" width="800" src="https://obs-cn-shanghai.fincloud.pinganyun.com/pacloud/20232006152128-120e441794d3.png"> </div> </li> <li class="li"> 进入<span class="ph uicontrol">计算机管理</span>页面,单击<span class="ph menucascade"><span class="ph uicontrol">系统工具</span><abbr> > </abbr><span class="ph uicontrol">本地用户和组</span><abbr> > </abbr><span class="ph uicontrol">用户</span></span>,在右侧空白区域右键单击,选择<span class="ph uicontrol">新用户</span>。 <div class="p"> <img class="image" id="Windows_FTP_Site__image_tkx_yhj_2sb" src="https://obs-cn-shanghai.fincloud.pinganyun.com/pacloud/20232006152128-169e442f92a3.png"> </div> </li> <li class="li"> 弹出<span class="ph uicontrol">新用户</span>页面,设置用户名和密码,本例中用户名为ftptest。 <div class="p"> <img class="image" id="Windows_FTP_Site__image_ajn_zhj_2sb" src="https://obs-cn-shanghai.fincloud.pinganyun.com/pacloud/20232006152128-1b47557f92f4.png"> </div><div class="note note note_note" id="Windows_FTP_Site__note_xvc_hyy_svb"><span class="note__title">说明:</span> 密码必须包括大写字母、小写字母和数字。</div> </li> <li class="li"> 单击<span class="ph uicontrol">创建</span>。 </li> </ol> </section> <section class="section" id="Windows_FTP_Site__section_nx4_hyy_svb"><h2 class="doc-tairway">步骤三:设置共享文件的权限</h2> <p class="p"> 为在 FTP 站点为共享给用户的文件夹设置访问、修改等权限。 </p> <ol class="ol" id="Windows_FTP_Site__ol_rx5_3yy_svb"> <li class="li"> 在服务器上创建一个供FTP使用的文件夹,本例中文件名为<span class="ph uicontrol">ftp</span>,右键单击文件夹,选择<span class="ph uicontrol">属性</span>。 <div class="p"> <img class="image" id="Windows_FTP_Site__image_xcp_c3j_2sb" src="https://obs-cn-shanghai.fincloud.pinganyun.com/pacloud/20232006152128-1e961b0896d0.png"> </div> </li> <li class="li"> 进入<span class="ph uicontrol">属性</span>页面,单击<span class="ph uicontrol">安全</span>页签,选择<span class="ph uicontrol">Everyone</span>,单击<span class="ph uicontrol">编辑</span>。 <div class="note note note_note" id="Windows_FTP_Site__note_sx5_3yy_svb"><span class="note__title">说明:</span> 若此处无Everyone可选,可以参考补充操作。</div><div class="p"> <img class="image" id="Windows_FTP_Site__image_ukc_d3j_2sb" src="https://obs-cn-shanghai.fincloud.pinganyun.com/pacloud/20232006152128-1716e7899f25.png"> </div> </li> <li class="li"> 选择<span class="ph uicontrol">Everyone</span>,根据需要勾选Everyone的权限,本例中允许所有权限,单击<span class="ph uicontrol">确定</span>。 <div class="p"> <img class="image" id="Windows_FTP_Site__image_e2r_d3j_2sb" src="https://obs-cn-shanghai.fincloud.pinganyun.com/pacloud/20232006152128-10190a349479.png"> </div> </li> <li class="li"> 在<span class="ph uicontrol">属性</span>页面再次单击<span class="ph uicontrol">确定</span>,关闭<span class="ph uicontrol">属性</span>页面。 </li> </ol> </section> <section class="section" id="Windows_FTP_Site__section_w5q_kyy_svb"><h2 class="doc-tairway">步骤四:添加及设置FTP站点</h2> <div class="p"> <ol class="ol" id="Windows_FTP_Site__ol_i5p_myy_svb"> <li class="li"> 在<span class="ph uicontrol">服务器管理器</span>页面,单击<span class="ph menucascade"><span class="ph uicontrol">仪表板</span><abbr> > </abbr><span class="ph uicontrol">工具</span><abbr> > </abbr><span class="ph uicontrol">Internet Information Services (IIS)管理器</span></span>。 <div class="p"> <img class="image" id="Windows_FTP_Site__image_rkd_l3j_2sb" width="800" src="https://obs-cn-shanghai.fincloud.pinganyun.com/pacloud/20232006152128-13fd8f9a989b.png"> </div> </li> <li class="li"> 进入<span class="ph uicontrol">Internet Information Services (IIS)管理器</span>页面,单击服务器名称前的<span class="ph uicontrol">></span>图标,展开所有显示内容。 <div class="p"> <img class="image" id="Windows_FTP_Site__image_gpb_m3j_2sb" src="https://obs-cn-shanghai.fincloud.pinganyun.com/pacloud/20232006152128-150234d099ef.png"> </div> </li> <li class="li"> 右键单击<span class="ph uicontrol">网站</span>,选择<span class="ph uicontrol">添加FTP站点</span>。 <div class="p"> <img class="image" id="Windows_FTP_Site__image_vxv_m3j_2sb" src="https://obs-cn-shanghai.fincloud.pinganyun.com/pacloud/20232006152128-102458639dc6.png"> </div> </li> <li class="li"> 弹出<span class="ph uicontrol">添加FTP站点</span>页面,输入FTP站点名称和共享文件夹的物理路径,单击<span class="ph uicontrol">下一步</span>。 <div class="p"> <img class="image" id="Windows_FTP_Site__image_vpv_n3j_2sb" src="https://obs-cn-shanghai.fincloud.pinganyun.com/pacloud/20232006152128-107ecaf4970e.png"> </div> </li> <li class="li"> 输入该云服务器ECS实例的公网IP地址以及端口号,FTP默认端口号为21,也可自行设置。 <div class="p"> <img class="image" id="Windows_FTP_Site__image_qpk_43j_2sb" src="https://obs-cn-shanghai.fincloud.pinganyun.com/pacloud/20232006152128-1866063b9d3f.png"> </div> </li> <li class="li"> 根据需要设置SSL,单击<span class="ph uicontrol">下一步</span>。 <div class="note note note_note" id="Windows_FTP_Site__note_j5p_myy_svb"><span class="note__title">说明:</span> <ul class="ul" id="Windows_FTP_Site__ul_arm_tld_2sb"> <li class="li">无:不需要SSL加密。</li> <li class="li">允许:允许FTP服务器与客户端的非SSL和SSL连接。</li> <li class="li">需要:需要对FTP服务器和客户端之间的通信进行SSL加密。</li> </ul> </div> </li> <li class="li"> 根据如下信息,勾选<span class="ph uicontrol">身份验证</span>、<span class="ph uicontrol">授权</span>、<span class="ph uicontrol">权限</span>选项,单击<span class="ph uicontrol">完成</span>。 <table class="table" id="Windows_FTP_Site__table_dp1_vld_2sb"><caption></caption><colgroup><col><col></colgroup><thead class="thead"> <tr class="row"> <th class="entry colsep-1 rowsep-1" id="Windows_FTP_Site__table_dp1_vld_2sb__entry__1"> <p class="p">配置项</p> </th> <th class="entry colsep-1 rowsep-1" id="Windows_FTP_Site__table_dp1_vld_2sb__entry__2"> <p class="p">说明</p> </th> </tr> </thead><tbody class="tbody"> <tr class="row"> <td class="entry colsep-1 rowsep-1" headers="Windows_FTP_Site__table_dp1_vld_2sb__entry__1 "> <p class="p"> 身份验证 </p> </td> <td class="entry colsep-1 rowsep-1" headers="Windows_FTP_Site__table_dp1_vld_2sb__entry__2 "> <p class="p">有两种身份验证方式:</p> <ul class="ul" id="Windows_FTP_Site__ul_ep1_vld_2sb"> <li class="li"><span class="ph uicontrol">匿名</span>:允许任何仅提供用户名 anonymous或ftp的用户访问内容。</li> <li class="li"><span class="ph uicontrol">基本</span>:需要用户提供有效用户名和密码才能访问内容。</li> </ul> <div class="note note note_note" id="Windows_FTP_Site__note_k5p_myy_svb"><span class="note__title">说明:</span> 基本身份验证通过网络传输密码时没有加密,建议在确认客户端和FTP服务器之间的网络连接安全时使用此身份验证方法。</div> </td> </tr> <tr class="row"> <td class="entry colsep-1 rowsep-1" headers="Windows_FTP_Site__table_dp1_vld_2sb__entry__1 "> <p class="p"> 授权 </p> </td> <td class="entry colsep-1 rowsep-1" headers="Windows_FTP_Site__table_dp1_vld_2sb__entry__2 "> <p class="p">在<span class="ph uicontrol">允许访问</span>下,选择某一选项。</p> <ul class="ul" id="Windows_FTP_Site__ul_fp1_vld_2sb"> <li class="li"><span class="ph uicontrol">所有用户</span>:所有用户均可访问相应内容。</li> <li class="li"><span class="ph uicontrol">匿名用户</span>:匿名用户可访问相应内容。</li> <li class="li"><span class="ph uicontrol">指定角色或用户组</span>:只有指定的角色或用户组的成员才能访问相应内容。若选择此项,请在下面输入框中输入指定的角色或用户组。</li> <li class="li"><span class="ph uicontrol">指定用户</span>:只有指定的用户才能访问相应内容。若选择此项,请在下面输入框中输入指定的用户。</li> </ul> </td> </tr> <tr class="row"> <td class="entry colsep-1 rowsep-1" headers="Windows_FTP_Site__table_dp1_vld_2sb__entry__1 "> <p class="p"> 权限 </p> </td> <td class="entry colsep-1 rowsep-1" headers="Windows_FTP_Site__table_dp1_vld_2sb__entry__2 "> <p class="p"> 选择经过授权的用户的<span class="ph uicontrol">读取</span>和<span class="ph uicontrol">写入</span>权限。 </p> </td> </tr> </tbody></table><div class="p"> <img class="image" id="Windows_FTP_Site__image_ot4_p3j_2sb" src="https://obs-cn-shanghai.fincloud.pinganyun.com/pacloud/20232006152128-19e45d759ac4.png"> </div> </li> <li class="li"> 完成后可以查看到搭建的FTP站点。 <div class="p"> <img class="image" id="Windows_FTP_Site__image_ah3_q3j_2sb" src="https://obs-cn-shanghai.fincloud.pinganyun.com/pacloud/20232006152128-13fd03549f1e.png"> </div> </li> </ol> </div> </section> <section class="section" id="Windows_FTP_Site__section_xst_myy_svb"><h2 class="doc-tairway">步骤五:配置FTP防火墙支持(可选)</h2> <p class="p"> 若您需要使用FTP服务器的被动模式,则需要配置FTP防火墙支持。 </p> <ol class="ol" id="Windows_FTP_Site__ol_vqj_4yy_svb"> <li class="li"> 双击<span class="ph uicontrol">FTP防火墙支持</span>,进入 <span class="ph uicontrol">FTP防火墙支持</span>页面。 <div class="p"> <img class="image" id="Windows_FTP_Site__image_rpq_2jj_2sb" width="800" src="https://obs-cn-shanghai.fincloud.pinganyun.com/pacloud/20232006152128-141448599b1f.png"> </div> </li> <li class="li"> 配置数据通道端口范围和防火墙的外部IP地址参数。 <div class="note note note_note" id="Windows_FTP_Site__note_wqj_4yy_svb"><span class="note__title">说明:</span> <ul class="ul" id="Windows_FTP_Site__ul_rhd_vth_2sb"> <li class="li"> <span class="ph uicontrol">数据通道端口范围</span>:指定用于被动连接的端口范围,可指定的端口范围是1025-65535,您可根据实际业务需求进行设置。</li> <li class="li"> <span class="ph uicontrol">防火墙的外部IP地址</span>:输入该云服务器ECS实例的公网IP地址。</li> </ul> </div> </li> <li class="li"> 在右侧操作区域单击<span class="ph uicontrol">应用</span>。 <div class="p"> <img class="image" id="Windows_FTP_Site__image_x3q_fjj_2sb" width="800" src="https://obs-cn-shanghai.fincloud.pinganyun.com/pacloud/20232006152128-116e9d6b9ccb.png"> </div><div class="note note note_note" id="Windows_FTP_Site__note_xqj_4yy_svb"><span class="note__title">说明:</span> 在<span class="ph uicontrol">操作</span>区域单击<span class="ph uicontrol">取消</span>,您可以取消设置的FTP防火墙支持。</div> </li> </ol> </section> <section class="section" id="Windows_FTP_Site__section_j3p_qyy_svb"><h2 class="doc-tairway">步骤六:设置安全组及防火墙</h2> <p class="p">FTP站点搭建完成后,您需要在云服务器ECS实例安全组的入方向添加一条放行FTP端口的规则,具体可参考<strong class="ph b">配置安全组规则</strong>。</p> <p class="p">用于FTP服务的服务器防火墙默认放行TCP 21端口,若您选用其他端口,需要在防火墙中添加一条放行此端口的入站规则。</p> </section> <section class="section" id="Windows_FTP_Site__section_gxj_ryy_svb"><h2 class="doc-tairway">步骤七:客户端测试</h2> <ol class="ol" id="Windows_FTP_Site__ol_ujy_syy_svb"> <li class="li"> 打开客户端IE浏览器。 </li> <li class="li"> 在路径栏输入:<span class="ph uicontrol">ftp://FTP服务器IP地址:FTP端口</span>,例如:ftp:// 101.89.95.105:21。 <div class="note note note_note" id="Windows_FTP_Site__note_vjy_syy_svb"><span class="note__title">说明:</span> 若不填端口信息,则默认访问21端口。</div> </li> <li class="li"> 弹出输入用户名和密码的对话框,表示配置成功,输入正确的用户名和密码,即可对 FTP 文件进行相应权限的操作。 <div class="note note note_note" id="Windows_FTP_Site__note_wjy_syy_svb"><span class="note__title">说明:</span> 若没有配置<span class="ph uicontrol">FTP防火墙支持</span>,客户端使用此方法访问FTP站点时,需要对IE浏览器进行设置,配置完成后,才能打开FTP的文件夹。您可以打开IE浏览器,选择<span class="ph menucascade"><span class="ph uicontrol">设置 </span><abbr> > </abbr><span class="ph uicontrol">Internet 选项</span><abbr> > </abbr><span class="ph uicontrol">高级</span></span>,在<span class="ph uicontrol">浏览</span>区域下勾选<span class="ph uicontrol">启用FTP文件夹视图</span>”,取消勾选<span class="ph uicontrol">使用被动FTP</span>。</div> </li> </ol> </section> <section class="section" id="Windows_FTP_Site__section_s4g_tyy_svb"><h2 class="doc-tairway">补充操作</h2> <p class="p"> 若设置文件夹属性时,没有<span class="ph uicontrol">Evevyone</span>的用户供选择,可按照如下步骤添加<span class="ph uicontrol">Evevyone</span>用户。 </p> <ol class="ol" id="Windows_FTP_Site__ol_tmm_5yy_svb"> <li class="li"> 在<span class="ph uicontrol">安全</span>页签组或用户名区域下,单击<span class="ph uicontrol">编辑</span>。 <div class="p"> <img class="image" id="Windows_FTP_Site__image_vdl_sjj_2sb" src="https://obs-cn-shanghai.fincloud.pinganyun.com/pacloud/20232006152128-12493a859286.png"> </div> </li> <li class="li"> 弹出<span class="ph uicontrol">权限</span>页面,单击<span class="ph uicontrol">添加</span>。 <div class="p"> <img class="image" id="Windows_FTP_Site__image_aq2_tjj_2sb" src="https://obs-cn-shanghai.fincloud.pinganyun.com/pacloud/20232006152128-18cdf09597d9.png"> </div> </li> <li class="li"> 弹出<span class="ph uicontrol">选择用户或组</span>页面,单击<span class="ph uicontrol">高级</span>。 <div class="p"> <img class="image" id="Windows_FTP_Site__image_dyw_tjj_2sb" src="https://obs-cn-shanghai.fincloud.pinganyun.com/pacloud/20232006152128-11e494af9c52.png"> </div> </li> <li class="li"> 在<span class="ph uicontrol">一般性查询</span>区域右侧单击<span class="ph uicontrol">立即查找</span>,在<span class="ph uicontrol">搜索结果</span>区域选择<span class="ph uicontrol">Everyone</span>,单击<span class="ph uicontrol">确定</span>。 <div class="p"> <img class="image" id="Windows_FTP_Site__image_wxf_yjj_2sb" src="https://obs-cn-shanghai.fincloud.pinganyun.com/pacloud/20232006152128-13812b109ce6.png"> </div> </li> <li class="li"> 连续两次单击<span class="ph uicontrol">确定</span>,完成<span class="ph uicontrol">添加</span>。 <div class="p"> <img class="image" id="Windows_FTP_Site__image_otz_yjj_2sb" src="https://obs-cn-shanghai.fincloud.pinganyun.com/pacloud/20232006152128-192386979ce5.png"> </div> </li> </ol> </section>
以上内容是否解决了您的问题?
请补全提交信息!
联系我们

电话咨询

400-151-8800

邮件咨询

fincloud@ocft.com

在线客服

工单支持

解决云产品相关技术问题