windows server2012之部署使用者隔離的FTP網站

來源:互聯網
上載者:User

標籤:windows server2012   安全性   隔離   

隔離就是把使用者隔離在自己的檔案夾裡也就是主目錄內,無法查看和修改其他使用者的目錄和檔案。這樣做可以提高檔案伺服器的安全性。

建立使用者隔離的大體思路是我們需要在網站的主目錄下建Localuser檔案夾,這個檔案夾要來存放使用者的主目錄和匿名訪問目錄。建好Localuser檔案夾後,接下來在Localuser下面就要建使用者的主目錄檔案夾還有匿名訪問檔案夾。注意使用者的主目錄檔案夾必須和使用者的登入名稱一一對應,匿名訪問檔案夾必須是Public,否則無效。

這裡要解釋下,匿名訪問檔案夾就是網站配置允許匿名訪問的情況下,匿名使用者所登入到的檔案夾,該檔案夾裡的內容是對匿名使用者是開放的。

同樣的,我們需要準備 三台伺服器server01(域控) 、server02(IIS) 、server03 (用戶端)。具體實驗步驟如下:

首先我們要在server02 上面安裝FTP伺服器,選擇伺服器管理員添加角色和功能,如:

650) this.width=650;" style="background-image:none;border-bottom:0px;border-left:0px;padding-left:0px;padding-right:0px;border-top:0px;border-right:0px;padding-top:0px;" title="clip_image002" border="0" alt="clip_image002" src="http://s3.51cto.com/wyfs02/M02/6D/8F/wKioL1Vmj2TyUIJVAAEQ1-FZGio120.jpg" height="307" />

下一步將WEB伺服器(IIS)中的FTP伺服器勾選,點擊下一步,

650) this.width=650;" style="background-image:none;border-bottom:0px;border-left:0px;padding-left:0px;padding-right:0px;border-top:0px;border-right:0px;padding-top:0px;" title="clip_image004" border="0" alt="clip_image004" src="http://s3.51cto.com/wyfs02/M00/6D/8F/wKioL1Vmj2jjH8hoAAFqit-QlHA118.jpg" height="402" />

點擊“下一步”繼續進行,

650) this.width=650;" style="background-image:none;border-bottom:0px;border-left:0px;padding-left:0px;padding-right:0px;border-top:0px;border-right:0px;padding-top:0px;" title="clip_image006" border="0" alt="clip_image006" src="http://s3.51cto.com/wyfs02/M01/6D/8F/wKioL1Vmj2ii59DeAAESL7j3Kw8965.jpg" height="398" />

下一步,點擊“安裝”,如:

650) this.width=650;" style="background-image:none;border-bottom:0px;border-left:0px;padding-left:0px;padding-right:0px;border-top:0px;border-right:0px;padding-top:0px;" title="clip_image008" border="0" alt="clip_image008" src="http://s3.51cto.com/wyfs02/M01/6D/93/wKiom1VmjdbhkCuuAAD-sdj6-zQ092.jpg" height="407" />

安裝完FTP服務後,我們要在FTP伺服器上建立新使用者,為了示範方便,我就用命令直接進行操作,如:

650) this.width=650;" style="background-image:none;border-bottom:0px;border-left:0px;padding-left:0px;padding-right:0px;border-top:0px;border-right:0px;padding-top:0px;" title="clip_image010" border="0" alt="clip_image010" src="http://s3.51cto.com/wyfs02/M02/6D/93/wKiom1VmjdfwZQFCAAEco6Pwd2s510.jpg" height="389" />

下一步,建立網站主目錄ftproot,使用者目錄localuser,匿名訪問檔案夾必須是Public,注意:目錄名與使用者名稱必須完全相同。如:

650) this.width=650;" style="background-image:none;border-bottom:0px;border-left:0px;padding-left:0px;padding-right:0px;border-top:0px;border-right:0px;padding-top:0px;" title="clip_image012" border="0" alt="clip_image012" src="http://s3.51cto.com/wyfs02/M00/6D/93/wKiom1VmjdrQDz0qAADEPr-3CZ4622.jpg" height="197" />

下一步,我們開啟IIS管理器,選擇網站——右鍵——添加FTP網站,如:

650) this.width=650;" style="background-image:none;border-bottom:0px;border-left:0px;padding-left:0px;padding-right:0px;border-top:0px;border-right:0px;padding-top:0px;" title="clip_image014" border="0" alt="clip_image014" src="http://s3.51cto.com/wyfs02/M01/6D/93/wKiom1VmjdrwtbpgAAFDP1FEI7o076.jpg" height="298" />

下一步,我們為網站起名為ftproot,實體路徑填寫我們建立的網站根目錄,如:

650) this.width=650;" style="background-image:none;border-bottom:0px;border-left:0px;padding-left:0px;padding-right:0px;border-top:0px;border-right:0px;padding-top:0px;" title="clip_image016" border="0" alt="clip_image016" src="http://s3.51cto.com/wyfs02/M02/6D/8F/wKioL1Vmj2yxsq9rAAC2XMRgXuw725.jpg" height="470" />

下一步,我們綁定IP,FTP伺服器的IP,FTP連接埠號碼預設為21,SSL選擇無,如:

650) this.width=650;" style="background-image:none;border-bottom:0px;border-left:0px;padding-left:0px;padding-right:0px;border-top:0px;border-right:0px;padding-top:0px;" title="clip_image018" border="0" alt="clip_image018" src="http://s3.51cto.com/wyfs02/M02/6D/8F/wKioL1Vmj2yRlDnDAAENjehGol4558.jpg" height="480" />

下一步,選擇基本驗證,根據需求給所有使用者讀取(寫入)的許可權,點擊完成,如:

650) this.width=650;" style="background-image:none;border-bottom:0px;border-left:0px;padding-left:0px;padding-right:0px;border-top:0px;border-right:0px;padding-top:0px;" title="clip_image020" border="0" alt="clip_image020" src="http://s3.51cto.com/wyfs02/M00/6D/8F/wKioL1Vmj23DrCi_AADq55eckBU661.jpg" height="494" />

我們添加完FTP網站後,就要開始建立使用者隔離,首先我們點擊剛剛建立的網站ftproot,點擊FTP使用者隔離,雙擊開啟,如:

650) this.width=650;" style="background-image:none;border-bottom:0px;border-left:0px;padding-left:0px;padding-right:0px;border-top:0px;border-right:0px;padding-top:0px;" title="clip_image022" border="0" alt="clip_image022" src="http://s3.51cto.com/wyfs02/M02/6D/93/wKiom1VmjdyhpW8RAAFQZCgRCmg078.jpg" height="305" />

下一步,選擇使用者名稱目錄(禁用全域虛擬目錄)選項,點擊應用,如:

650) this.width=650;" style="background-image:none;border-bottom:0px;border-left:0px;padding-left:0px;padding-right:0px;border-top:0px;border-right:0px;padding-top:0px;" title="clip_image024" border="0" alt="clip_image024" src="http://s3.51cto.com/wyfs02/M01/6D/93/wKiom1VmjdzCwRHKAAEo_pRb6og970.jpg" height="304" />

以上就基本完成了使用者隔離的操作,下面我們來到server03(用戶端)的機器上來驗證訪問是否生效。

在server03 的資源管理員輸入ftp://192.168.1.102/panpan 訪問panpan的檔案夾,會出現如下的登入身分識別驗證,我們輸入對應的使用者名稱密碼,如:

650) this.width=650;" style="background-image:none;border-bottom:0px;border-left:0px;padding-left:0px;padding-right:0px;border-top:0px;border-right:0px;padding-top:0px;" title="clip_image026" border="0" alt="clip_image026" src="http://s3.51cto.com/wyfs02/M02/6D/8F/wKioL1Vmj27BxKT1AAGVZrVpWrI724.jpg" height="397" />

身分識別驗證後,我們就可以訪問裡面的內容了,如:

650) this.width=650;" style="background-image:none;border-bottom:0px;border-left:0px;padding-left:0px;padding-right:0px;border-top:0px;border-right:0px;padding-top:0px;" title="clip_image028" border="0" alt="clip_image028" src="http://s3.51cto.com/wyfs02/M00/6D/8F/wKioL1Vmj27yZu3sAAB9Om9RwTA702.jpg" height="149" />

下面我們再用其他使用者登入訪問panpan檔案夾看是否會訪問成功,輸入另一個使用者的賬戶和密碼,如:

650) this.width=650;" style="background-image:none;border-bottom:0px;border-left:0px;padding-left:0px;padding-right:0px;border-top:0px;border-right:0px;padding-top:0px;" title="clip_image030" border="0" alt="clip_image030" src="http://s3.51cto.com/wyfs02/M01/6D/8F/wKioL1Vmj26R7w6IAAGf0GZIQLA815.jpg" height="402" />

輸入使用者名稱密碼後,會出現以下對話方塊提示我們沒有許可權訪問該檔案,驗證了我們使用者隔離操作已經成功啦~~~!

650) this.width=650;" style="background-image:none;border-bottom:0px;border-left:0px;padding-left:0px;padding-right:0px;border-top:0px;border-right:0px;padding-top:0px;" title="clip_image032" border="0" alt="clip_image032" src="http://s3.51cto.com/wyfs02/M02/6D/8F/wKioL1Vmj27AAwegAADqAXuRuKU548.jpg" height="255" />

接下來我們要串連FTP伺服器,在命令列中運行FTP——open 192.168.1.102 21(ftp伺服器IP+連接埠號碼),我們就可以登入到FTP伺服器,進行下載(由於之前的使用權限設定為唯讀,所以只能進行下載操作)檔案等操作,如所示:

650) this.width=650;" style="background-image:none;border-bottom:0px;border-left:0px;padding-left:0px;padding-right:0px;border-top:0px;border-right:0px;padding-top:0px;" title="clip_image034" border="0" alt="clip_image034" src="http://s3.51cto.com/wyfs02/M02/6D/93/wKiom1Vmjd2xPwJLAAGkXSCTqX0655.jpg" height="388" />

以上我們部署的使用者隔離網站已經完成了,實驗的步驟比較詳細,大家也可以進行操作實驗啊,感謝大家觀看,麼麼麼麼噠~~~~!!!

本文出自 “與IT一起的日子” 部落格,請務必保留此出處http://yuanquan.blog.51cto.com/9996673/1655897

windows server2012之部署使用者隔離的FTP網站

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.